Changeset 43854 in vbox
- Timestamp:
- Nov 9, 2012 7:44:50 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp
r41689 r43854 940 940 return false; 941 941 942 /* It's possible that a key has been pressed while the keyboard was not 943 * captured, but is being released under the capture. Detect this situation 944 * and return false to let Windows process the message normally and update 945 * its key state table (to avoid the stuck key effect). */ 946 /** @todo Is there any reason why we can't generally return "false" for 947 * key releases, even if we do process them? It would let us drop this 948 * hard-to-read logic. */ 949 uint8_t what_pressed = (event.flags & 0x01) 950 && (event.vkCode != VK_RSHIFT) 951 ? IsExtKeyPressed : IsKeyPressed; 952 if ( (event.flags & 0x80) /* released */ 953 && ( ( UIHotKeyCombination::toKeyCodeList(m_globalSettings.hostCombo()).contains(event.vkCode) 954 && !m_bIsHostkeyInCapture) 955 || ( m_pressedKeys[event.scanCode] 956 & (IsKbdCaptured | what_pressed)) 957 == what_pressed)) 958 return false; 959 942 960 /* Sometimes it happens that Win inserts additional events on some key 943 961 * press/release. For example, it prepends ALT_GR in German layout with … … 964 982 * and not in the keyboard capture handler. */ 965 983 if (!m_fIsKeyboardCaptured) 966 return false;967 968 /* It's possible that a key has been pressed while the keyboard was not969 * captured, but is being released under the capture. Detect this situation970 * and return false to let Windows process the message normally and update971 * its key state table (to avoid the stuck key effect). */972 uint8_t what_pressed = (event.flags & 0x01) && (event.vkCode != VK_RSHIFT) ? IsExtKeyPressed : IsKeyPressed;973 if ((event.flags & 0x80) /* released */ &&974 ((UIHotKeyCombination::toKeyCodeList(m_globalSettings.hostCombo()).contains(event.vkCode) && !m_bIsHostkeyInCapture) ||975 (m_pressedKeys[event.scanCode] & (IsKbdCaptured | what_pressed)) == what_pressed))976 984 return false; 977 985
Note:
See TracChangeset
for help on using the changeset viewer.