Changeset 9922 for trunk/src/user32/winkeyboard.cpp
- Timestamp:
- Mar 17, 2003, 6:59:34 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/winkeyboard.cpp
r9814 r9922 1 /* $Id: winkeyboard.cpp,v 1.4 0 2003-02-16 18:29:27sandervl Exp $ */1 /* $Id: winkeyboard.cpp,v 1.41 2003-03-17 17:59:34 sandervl Exp $ */ 2 2 /* 3 3 * Win32 <-> PM key translation … … 1427 1427 // return O32_GetKeyNameText(arg1, arg2, arg3); 1428 1428 } 1429 1430 //****************************************************************************** 1431 //****************************************************************************** 1432 ULONG WinConvertNumPadKey(ULONG winVKey) 1433 { 1434 ULONG ret; 1435 BYTE winKey; 1436 1437 switch (winVKey) 1438 { 1439 case VK_HOME: ret = VK_NUMPAD7; break; 1440 case VK_UP: ret = VK_NUMPAD8; break; 1441 case VK_PRIOR: ret = VK_NUMPAD9; break; 1442 case VK_LEFT: ret = VK_NUMPAD4; break; 1443 case VK_RIGHT: ret = VK_NUMPAD6; break; 1444 case VK_END: ret = VK_NUMPAD1; break; 1445 case VK_DOWN: ret = VK_NUMPAD2; break; 1446 case VK_NEXT: ret = VK_NUMPAD3; break; 1447 case VK_INSERT:ret = VK_NUMPAD0; break; 1448 case VK_DELETE:ret = VK_DECIMAL; break; 1449 default: 1450 ret = winVKey; 1451 } 1452 dprintf(("Returning %x",ret)); 1453 return ret; 1454 } 1455 1429 1456 //****************************************************************************** 1430 1457 //****************************************************************************** … … 1464 1491 } 1465 1492 1493 if ((nVirtKey >= VK_PRIOR) && (nVirtKey <= VK_DELETE)) 1494 { 1495 WORD numState = OSLibWinGetScanState(abWinVKeyToPMScan[VK_NUMLOCK].bPMScanCode) & 1; 1496 1497 if(!numState) { 1498 //@PF We also keep track in PM how much times the key has been pressed 1499 //in win32 we can ignore this information - if some apps will demand this 1500 //this is TO-DO 1501 nVirtKey2 = WinConvertNumPadKey(nVirtKey); 1502 } 1503 } 1504 else 1466 1505 if (nVirtKey == VK_MENU) { 1467 1506 nVirtKey = VK_LMENU; … … 1523 1562 //not down, check the control keys 1524 1563 } 1564 1565 if ((nVirtKey >= VK_PRIOR) && (nVirtKey <= VK_DELETE)) 1566 { 1567 WORD numState = OSLibWinGetScanState(abWinVKeyToPMScan[VK_NUMLOCK].bPMScanCode) & 1; 1568 1569 if(!numState) { 1570 //@PF We also keep track in PM how much times the key has been pressed 1571 //in win32 we can ignore this information - if some apps will demand this 1572 //this is TO-DO 1573 nVirtKey2 = WinConvertNumPadKey(nVirtKey); 1574 } 1575 } 1576 else 1525 1577 if (nVirtKey == VK_MENU) { 1526 1578 nVirtKey = VK_LMENU;
Note:
See TracChangeset
for help on using the changeset viewer.