- Timestamp:
- Oct 26, 2001, 12:04:13 PM (24 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/HOOK.CPP
r7211 r7212 1 /* $Id: HOOK.CPP,v 1.3 0 2001-10-26 09:10:12phaller Exp $ */1 /* $Id: HOOK.CPP,v 1.31 2001-10-26 10:03:33 phaller Exp $ */ 2 2 3 3 /* … … 791 791 792 792 case VK_LCONTROL: 793 case VK_CONTROL: 794 msg->wParam = VK_CONTROL; // 0x11 793 case VK_RCONTROL: 794 msg->wParam = VK_CONTROL; // 0x11 795 break; 796 797 case VK_LSHIFT: 798 case VK_RSHIFT: 799 msg->wParam = VK_SHIFT; // 0x10 795 800 break; 796 801 } -
trunk/src/user32/oslibmsg.cpp
r7211 r7212 1 /* $Id: oslibmsg.cpp,v 1.4 7 2001-10-26 09:10:12phaller Exp $ */1 /* $Id: oslibmsg.cpp,v 1.48 2001-10-26 10:03:34 phaller Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 248 248 // if this is a keyup or keydown message, we've got to 249 249 // call the keyboard hook here 250 if(pMsg->message <= WINWM_KEYLAST && pMsg->message >= WINWM_KEYDOWN) 250 // send keyboard messages to the registered hooks 251 switch (pMsg->message) 251 252 { 252 ProcessKbdHook(pMsg, TRUE); 253 case WINWM_KEYDOWN: 254 case WINWM_KEYUP: 255 case WINWM_SYSKEYDOWN: 256 case WINWM_SYSKEYUP: 257 // only supposed to be called upon WM_KEYDOWN 258 // and WM_KEYUP according to docs. 259 if(ProcessKbdHook(pMsg, TRUE)) 260 goto continuegetmsg; 261 break; 253 262 } 254 263 … … 300 309 301 310 // send keyboard messages to the registered hooks 302 if(pMsg->message <= WINWM_KEYLAST && pMsg->message >= WINWM_KEYDOWN)311 switch (pMsg->message) 303 312 { 304 // only supposed to be called upon WM_KEYDOWN 305 // and WM_KEYUP according to docs. 306 if(ProcessKbdHook(pMsg, TRUE)) 307 goto continuegetmsg; 308 } 313 case WINWM_KEYDOWN: 314 case WINWM_KEYUP: 315 case WINWM_SYSKEYDOWN: 316 case WINWM_SYSKEYUP: 317 // only supposed to be called upon WM_KEYDOWN 318 // and WM_KEYUP according to docs. 319 if(ProcessKbdHook(pMsg, TRUE)) 320 goto continuegetmsg; 321 break; 322 } 323 309 324 return rc; 310 325 } … … 374 389 // if this is a keyup or keydown message, we've got to 375 390 // call the keyboard hook here 376 if(pMsg->message <= WINWM_KEYLAST && pMsg->message >= WINWM_KEYDOWN) 391 // send keyboard messages to the registered hooks 392 switch (pMsg->message) 377 393 { 378 ProcessKbdHook(pMsg, fRemove); 379 } 394 case WINWM_KEYDOWN: 395 case WINWM_KEYUP: 396 case WINWM_SYSKEYDOWN: 397 case WINWM_SYSKEYUP: 398 // only supposed to be called upon WM_KEYDOWN 399 // and WM_KEYUP according to docs. 400 if(ProcessKbdHook(pMsg, fRemove)) 401 goto continuepeekmsg; 402 break; 403 } 404 380 405 return TRUE; 381 406 } … … 419 444 420 445 // send keyboard messages to the registered hooks 421 if(pMsg->message <= WINWM_KEYLAST && pMsg->message >= WINWM_KEYDOWN)446 switch (pMsg->message) 422 447 { 423 // only supposed to be called upon WM_KEYDOWN 424 // and WM_KEYUP according to docs. 425 if(ProcessKbdHook(pMsg, fRemove)) 426 goto continuepeekmsg; 448 case WINWM_KEYDOWN: 449 case WINWM_KEYUP: 450 case WINWM_SYSKEYDOWN: 451 case WINWM_SYSKEYUP: 452 // only supposed to be called upon WM_KEYDOWN 453 // and WM_KEYUP according to docs. 454 if(ProcessKbdHook(pMsg, fRemove)) 455 goto continuepeekmsg; 456 break; 427 457 } 428 458 -
trunk/src/user32/oslibmsgtranslate.cpp
r7211 r7212 1 /* $Id: oslibmsgtranslate.cpp,v 1. 69 2001-10-26 09:10:12phaller Exp $ */1 /* $Id: oslibmsgtranslate.cpp,v 1.70 2001-10-26 10:03:34 phaller Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 36 36 #include <pmscan.h> 37 37 #include <winscan.h> 38 #include <winkeyboard.h> 38 39 39 40 #define DBG_LOCALLOG DBG_oslibmsgtranslate 40 41 #include "dbglocal.h" 41 42 43 44 #if REDUNDANT_AND_BUGGY_DEFINITION 42 45 // Formerly used method of translation based on OS/2 VKEY value didn't work 43 46 // right. We need to take a look at the scan code we get from PM and derive … … 89 92 0xDE, 0x28, // 0x28 ' 90 93 0xC0, 0x29, // 0x29 ` 91 0x10, 0x2A, // 0x2A LShift94 VK_LSHIFT_W, 0x2A, // 0x2A LShift 92 95 0xDC, 0x2B, // 0x2B Bkslsh 93 96 0x5A, 0x2C, // 0x2C z … … 101 104 0xBE, 0x34, // 0x34 . 102 105 0xBF, 0x35, // 0x35 / 103 0x10, 0x36, // 0x36 RShift106 VK_RSHIFT_W, 0x36, // 0x36 RShift 104 107 0x6A, 0x37, // 0x37 * Pad 105 108 // 0x12, 0x38, // 0x38 LAlt … … 161 164 0x5C, 0x15C // 0x6F RMenu? (PM scan 0x7F) 162 165 }; 166 #endif 163 167 164 168 static BOOL fGenerateDoubleClick = FALSE; … … 730 734 VirtualKeyFound: 731 735 // dprintf (("VIRTUALKEYFOUND:(%x)", virtualKey)); 732 736 737 // @@@PH: what's this supposed to be? 733 738 // Adjust PM scancodes for Win* keys 734 739 if (scanCode >= 0x70) 735 scanCode -= 0x10; 736 winMsg->wParam = pmscan2winkey[scanCode][0]; 740 scanCode -= 0x10; 741 742 // winMsg->wParam = pmscan2winkey[scanCode][0]; 743 // wWinScan = pmscan2winkey[scanCode][1]; 744 { 745 BOOL fWinExtended; 746 BYTE bWinVKey; 747 WORD wWinScan; 748 749 // Note: Numlock-state currently ignored, see below 750 KeyTranslatePMScanToWinVKey(scanCode, 751 FALSE, 752 &bWinVKey, 753 &wWinScan, 754 &fWinExtended); 755 winMsg->wParam = bWinVKey; 737 756 winMsg->lParam = repeatCount & 0x0FFFF; // bit 0-15, repeatcount 738 winMsg->lParam |= (pmscan2winkey[scanCode][1] & 0x1FF) << 16; // bit 16-23, scancode + bit 15 extended 757 winMsg->lParam |= (wWinScan & 0x1FF) << 16; // bit 16-23, scancode + bit 15 extended 758 } 739 759 740 760 // Adjust VKEY value for pad digits if NumLock is on -
trunk/src/user32/winkeyboard.cpp
r7201 r7212 1 /* $Id: winkeyboard.cpp,v 1.2 2 2001-10-25 13:16:57phaller Exp $ */1 /* $Id: winkeyboard.cpp,v 1.23 2001-10-26 10:03:34 phaller Exp $ */ 2 2 /* 3 3 * Win32 <-> PM key translation … … 105 105 /* 0x34 PMSCAN_PERIOD */ , VK_PERIOD ,FALSE 106 106 /* 0x35 PMSCAN_SLASH */ , VK_SLASH ,FALSE 107 /* 0x36 PMSCAN_SHIFTRIGHT */ , VK_RSHIFT , FALSE107 /* 0x36 PMSCAN_SHIFTRIGHT */ , VK_RSHIFT ,TRUE 108 108 /* 0x37 PMSCAN_PADASTERISK */ , VK_MULTIPLY ,FALSE 109 109 /* 0x38 PMSCAN_ALTLEFT */ , VK_LMENU ,FALSE … … 640 640 /* 0x34 PMSCAN_PERIOD */ , WINSCAN_PERIOD ,FALSE 641 641 /* 0x35 PMSCAN_SLASH */ , WINSCAN_SLASH ,FALSE 642 /* 0x36 PMSCAN_SHIFTRIGHT */ , WINSCAN_SHIFTRIGHT , FALSE642 /* 0x36 PMSCAN_SHIFTRIGHT */ , WINSCAN_SHIFTRIGHT ,TRUE 643 643 /* 0x37 PMSCAN_PADASTERISK */ , WINSCAN_PADASTERISK ,FALSE 644 644 /* 0x38 PMSCAN_ALTLEFT */ , WINSCAN_ALTLEFT ,FALSE … … 900 900 //****************************************************************************** 901 901 //****************************************************************************** 902 void KeyTranslatePMScanToWinVKey(BYTE bPMScan, 903 BOOL bNumLock, 904 PBYTE pbWinVKey, 905 WORD* pwWinScan, 906 PBOOL pfExtended) 907 { 908 // @@@PH numlock is currently ignored 909 if (pbWinVKey) 910 *pbWinVKey = abPMScanToWinVKey[bPMScan][0]; 911 912 if (pfExtended) 913 *pfExtended = abPMScanToWinVKey[bPMScan][1]; 914 915 if (pwWinScan) 916 *pwWinScan = abPMScanToWinScan[bPMScan][0]; 917 } 918 //****************************************************************************** 919 //****************************************************************************** 902 920 BYTE KeyTranslateWinScanToPMScan(BYTE bWinScan, BOOL fExtended) 903 921 {
Note:
See TracChangeset
for help on using the changeset viewer.