Changeset 37364 in vbox
- Timestamp:
- Jun 7, 2011 8:23:51 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 72134
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp
r37348 r37364 491 491 if (pEvent->type == XFocusIn) 492 492 { 493 #if 0 493 494 /* Capture keyboard by chosen view number: */ 494 495 captureKeyboard(uScreenId); … … 496 497 if (isAutoCaptureDisabled()) 497 498 setAutoCaptureDisabled(false); 499 #endif 498 500 } 499 501 else … … 602 604 break; 603 605 } 606 #if 0 604 607 case KMachineState_Running: 605 608 { … … 626 629 break; 627 630 } 631 #endif 628 632 default: 629 633 break; … … 826 830 switch (pEvent->type()) 827 831 { 832 #if 0 828 833 case QEvent::FocusIn: 829 834 if (isSessionRunning()) … … 842 847 } 843 848 break; 849 #endif 844 850 case QEvent::FocusOut: 845 851 /* Release keyboard: */ … … 1141 1147 /** 1142 1148 * Handle a non-special (C-A-D, pause, print) key press or release 1143 * @returns true if handling should stop here , false otherwise1149 * @returns true if handling should stop here (spurious event), false otherwise 1144 1150 */ 1145 1151 bool UIKeyboardHandler::keyEventHandleNormal(int iKey, uint8_t uScan, int fFlags, LONG *pCodes, uint *puCodesCount) … … 1190 1196 return true; 1191 1197 return false; 1198 } 1199 1200 /** Capture the keyboard if a non-modifier key was pressed. */ 1201 void UIKeyboardHandler::keyEventHandleCapturing(uint8_t uScan, int fFlags, 1202 ulong uScreenId) 1203 { 1204 if ( (fFlags & KeyPressed) 1205 && uScan != 0x1d /* ctrl */ && uScan != 0x2a /* left shift */ 1206 && uScan != 0x36 /* right shift */ && uScan != 0x38 /* alt */ 1207 && uScan != 0x5b /* left win */ && uScan != 0x5c /* right win */) 1208 { 1209 /* Capture keyboard by chosen view number: */ 1210 captureKeyboard(uScreenId); 1211 /* Reset the single-time disable capture flag: */ 1212 if (isAutoCaptureDisabled()) 1213 setAutoCaptureDisabled(false); 1214 } 1192 1215 } 1193 1216 … … 1393 1416 return true; 1394 1417 } 1418 1419 /* This must come before host key handling */ 1420 keyEventHandleCapturing(uScan, fFlags, uScreenId); 1395 1421 1396 1422 /* Process the host-combo funtionality: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.h
r37348 r37364 126 126 bool keyEventCADHandled(uint8_t uScan); 127 127 bool keyEventHandleNormal(int iKey, uint8_t uScan, int fFlags, LONG *pCodes, uint *puCodesCount); 128 void keyEventHandleCapturing(uint8_t uScan, int fFlags, ulong uScreenId); 128 129 bool keyEventHostComboHandled(int iKey, wchar_t *pUniKey, bool isHostComboStateChanged, bool *pfResult); 129 130 void keyEventHandleHostComboRelease(ulong uScreenId);
Note:
See TracChangeset
for help on using the changeset viewer.