Changeset 45873 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- May 2, 2013 10:48:59 AM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 85464
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.cpp
r45871 r45873 393 393 * RAlt key event matching this LCtrl event (i.e. both key up or both key down) 394 394 * and if there is, we check whether the current layout has an AltGr key. We 395 * check this by looking to see if any of the numberkeys has a symbol396 * associated when AltGr is pressed. Let's see how well this works!395 * check this by looking to see if any of the layout-dependent keys has a symbol 396 * associated when AltGr is pressed. 397 397 */ 398 398 static bool isSyntheticLCtrl(MSG *pMsg) … … 407 407 if ((pMsg->lParam & 0x01FF0000) >> 16 != 0x1d /* LCtrl */) 408 408 return false; 409 LogRel(("Got an LCtrl event.\n")); 409 if (!PeekMessage(&peekMsg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_NOREMOVE)) 410 return false; 411 if ( (pMsg->message == WM_KEYDOWN || pMsg->message == WM_SYSKEYDOWN) 412 && (peekMsg.message != WM_KEYDOWN && peekMsg.message != WM_SYSKEYDOWN)) 413 return false; 414 if ( (pMsg->message == WM_KEYUP || pMsg->message == WM_SYSKEYUP) 415 && (peekMsg.message != WM_KEYUP && peekMsg.message != WM_SYSKEYUP)) 416 return false; 417 if ((peekMsg.lParam & 0x01FF0000) >> 16 != 0x138 /* RAlt */) 418 return false; 410 419 for (i = '0'; i <= VK_OEM_102; ++i) 411 420 { … … 424 433 if (i > VK_OEM_102) 425 434 return false; 426 LogRel(("Virtual key %d has an AltGr state.\n", i));427 if (!PeekMessage(&peekMsg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_NOREMOVE))428 return false;429 LogRel(("Another keyboard event follows.\n"));430 if (pMsg->time != peekMsg.time)431 return false;432 LogRel(("Both events have the same time stamp.\n"));433 if ( (pMsg->message == WM_KEYDOWN || pMsg->message == WM_SYSKEYDOWN)434 && (peekMsg.message != WM_KEYDOWN && peekMsg.message != WM_SYSKEYDOWN))435 return false;436 if ( (pMsg->message == WM_KEYUP || pMsg->message == WM_SYSKEYUP)437 && (peekMsg.message != WM_KEYUP && peekMsg.message != WM_SYSKEYUP))438 return false;439 LogRel(( (pMsg->message == WM_KEYDOWN || pMsg->message == WM_SYSKEYDOWN)440 ? "Both are KEYDOWN events.\n"441 : "Both are KEYUP events.\n"));442 if ((peekMsg.lParam & 0x01FF0000) >> 16 != 0x138 /* RAlt */)443 return false;444 LogRel(("The next keyboard event is RAlt.\n"));445 435 return true; 446 436 }
Note:
See TracChangeset
for help on using the changeset viewer.