Changeset 33944 in vbox
- Timestamp:
- Nov 10, 2010 5:31:27 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp
r33897 r33944 935 935 UInt32 keyCode = ~0U; 936 936 ::GetEventParameter(inEvent, kEventParamKeyCode, typeUInt32, NULL, sizeof (keyCode), NULL, &keyCode); 937 /* The usb keyboard driver translates these codes to different virtual 938 * key codes depending of the keyboard type. There are ANSI, ISO, JIS 939 * and unknown. For European keyboards (ISO) the key 0xa and 0x32 have 940 * to be switched. Here we are doing this at runtime, cause the user 941 * can have more than one keyboard (of different type), where he may 942 * switch at will all the time. Default is the ANSI standard as defined 943 * in g_aDarwinToSet1. Please note that the "~" on some English ISO 944 * keyboards will be wrongly swapped. This can maybe fixed by 945 * using a Apple keyboard layout in the guest. */ 937 946 if ( (keyCode == 0xa || keyCode == 0x32) 938 947 && KBGetLayoutType(LMGetKbdType()) == kKeyboardISO) 939 948 keyCode = 0x3c - keyCode; 940 #ifdef DEBUG941 if ((keyCode == 0xa || keyCode == 0x32))942 {943 OSErr err = noErr;944 SInt32 type;945 if ((err = Gestalt(gestaltKeyboardType, &type)) == noErr)946 LogRel(("Keyboard type %d %d\n", (int32_t)type, LMGetKbdType()));947 }948 #endif /* DEBUG */949 949 unsigned scanCode = ::DarwinKeycodeToSet1Scancode(keyCode); 950 950 if (scanCode)
Note:
See TracChangeset
for help on using the changeset viewer.