- Timestamp:
- Nov 9, 2001, 2:26:15 AM (24 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/HOOK.CPP
r7216 r7306 1 /* $Id: HOOK.CPP,v 1.3 2 2001-10-26 12:46:16phaller Exp $ */1 /* $Id: HOOK.CPP,v 1.33 2001-11-09 01:26:14 phaller Exp $ */ 2 2 3 3 /* … … 859 859 // Note: ALT seems to stick sometimes 860 860 // Note: ALTGR can't be queried 861 BOOL fAltDown ; //= GetAsyncKeyState(VK_LMENU);861 BOOL fAltDown = GetAsyncKeyState(VK_LMENU); 862 862 863 863 // this bit indicates if ALT was held 864 fAltDown = msg->lParam & 0x20000000;864 // fAltDown = msg->lParam & 0x20000000; 865 865 866 866 kbhs.flags = fKeyUp ? LLKHF_UP : 0; -
trunk/src/user32/oslibmsgtranslate.cpp
r7235 r7306 1 /* $Id: oslibmsgtranslate.cpp,v 1.7 4 2001-10-27 09:06:02phaller Exp $ */1 /* $Id: oslibmsgtranslate.cpp,v 1.75 2001-11-09 01:26:15 phaller Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 661 661 { 662 662 winMsg->message = WINWM_SYSKEYUP; 663 //winMsg->lParam |= 1 << 29; // bit 29, alt was pressed663 winMsg->lParam |= 1 << 29; // bit 29, alt was pressed 664 664 winMsg->lParam |= 1 << 30; // bit 30, previous state, always 1 for a WM_KEYUP message 665 665 winMsg->lParam |= 1 << 31; // bit 31, transition state, always 1 for WM_KEYUP 666 667 // Note: altgr affects the alt-key state in windows! 668 // The overlay causes GetKeyState/GetAsyncKeyState to return 669 // the correct states 670 KeySetOverlayKeyState(VK_LMENU_W, KEYOVERLAYSTATE_DONTCARE); 671 KeySetOverlayKeyState(VK_LCONTROL_W, KEYOVERLAYSTATE_DONTCARE); 672 KeySetOverlayKeyState(VK_RMENU_W, KEYOVERLAYSTATE_DONTCARE); 666 673 } 667 674 else … … 671 678 winMsg->lParam |= 1 << 30; // bit 30, previous state, 1 means key was pressed 672 679 winMsg->message = WINWM_KEYDOWN; 680 681 // Note: altgr affects the alt-key state in windows! 682 // The overlay causes GetKeyState/GetAsyncKeyState to return 683 // the correct states 684 KeySetOverlayKeyState(VK_LMENU_W, KEYOVERLAYSTATE_DOWN); 685 KeySetOverlayKeyState(VK_LCONTROL_W, KEYOVERLAYSTATE_DOWN); 686 KeySetOverlayKeyState(VK_RMENU_W, KEYOVERLAYSTATE_DOWN); 673 687 } 674 688 -
trunk/src/user32/winkeyboard.cpp
r7221 r7306 1 /* $Id: winkeyboard.cpp,v 1.2 5 2001-10-26 15:54:04phaller Exp $ */1 /* $Id: winkeyboard.cpp,v 1.26 2001-11-09 01:26:15 phaller Exp $ */ 2 2 /* 3 3 * Win32 <-> PM key translation … … 32 32 ODINDEBUGCHANNEL(USER32-WINKBD) 33 33 34 35 /**************************************************************************** 36 * module local variables 37 ****************************************************************************/ 38 39 static char arrchOverlayKeyState[256] = {0}; 40 41 42 43 44 /**************************************************************************** 45 * implementation 46 ****************************************************************************/ 34 47 35 48 BOOL OPEN32API _O32_GetKeyboardState( PBYTE lpKeyState ); … … 973 986 if(rc == TRUE) 974 987 { 975 KeyTranslatePMToWinBuf((BYTE *)&PMKeyState[0], lpKeyState, 256); 988 KeyTranslatePMToWinBuf((BYTE *)&PMKeyState[0], lpKeyState, 256); 989 990 // @@@PH 991 // Note: we'd have to check the key state overlay array here, too! 992 976 993 #ifdef DEBUG 977 994 for(int i=0;i<256;i++) { … … 1389 1406 int, nVirtKey) 1390 1407 { 1408 // check overlay array first 1409 char nState = arrchOverlayKeyState[nVirtKey & 0xff]; 1410 switch (nState) 1411 { 1412 case KEYOVERLAYSTATE_DONTCARE: 1413 // forward processing ... 1414 break; 1415 1416 // @@@PH Note: key-toggle is not handled correctpy 1417 case KEYOVERLAYSTATE_DOWN: 1418 return 0x8000; 1419 1420 case KEYOVERLAYSTATE_UP: 1421 return 0x0000; 1422 } 1423 1391 1424 return O32_GetKeyState(nVirtKey); 1392 1425 } … … 1396 1429 INT, nVirtKey) 1397 1430 { 1431 // check overlay array first 1432 char nState = arrchOverlayKeyState[nVirtKey & 0xff]; 1433 switch (nState) 1434 { 1435 case KEYOVERLAYSTATE_DONTCARE: 1436 // forward processing ... 1437 break; 1438 1439 // @@@PH Note: key-toggle is not handled correctpy 1440 case KEYOVERLAYSTATE_DOWN: 1441 return 0x8000; 1442 1443 case KEYOVERLAYSTATE_UP: 1444 return 0x0000; 1445 } 1446 1398 1447 if(fVersionWarp3) 1399 1448 { … … 1741 1790 //****************************************************************************** 1742 1791 //****************************************************************************** 1792 1793 // this is an internal function to emulate Alt-Gr behaviour 1794 ODINPROCEDURE2(KeySetOverlayKeyState, 1795 int, nVirtKey, 1796 char, nState) 1797 { 1798 // setup overlay array 1799 arrchOverlayKeyState[nVirtKey & 0xff] = nState; 1800 } 1801
Note:
See TracChangeset
for help on using the changeset viewer.