Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp	(revision 33943)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp	(revision 33944)
@@ -935,16 +935,16 @@
         UInt32 keyCode = ~0U;
         ::GetEventParameter(inEvent, kEventParamKeyCode, typeUInt32, NULL, sizeof (keyCode), NULL, &keyCode);
+        /* The usb keyboard driver translates these codes to different virtual
+         * key codes depending of the keyboard type. There are ANSI, ISO, JIS
+         * and unknown. For European keyboards (ISO) the key 0xa and 0x32 have
+         * to be switched. Here we are doing this at runtime, cause the user
+         * can have more than one keyboard (of different type), where he may
+         * switch at will all the time. Default is the ANSI standard as defined
+         * in g_aDarwinToSet1. Please note that the "~" on some English ISO
+         * keyboards will be wrongly swapped. This can maybe fixed by
+         * using a Apple keyboard layout in the guest. */
         if (   (keyCode == 0xa || keyCode == 0x32)
             && KBGetLayoutType(LMGetKbdType()) == kKeyboardISO)
             keyCode = 0x3c - keyCode;
-#ifdef DEBUG
-        if ((keyCode == 0xa || keyCode == 0x32))
-        {
-            OSErr err = noErr;
-            SInt32 type;
-            if ((err = Gestalt(gestaltKeyboardType, &type)) == noErr)
-                LogRel(("Keyboard type %d %d\n", (int32_t)type, LMGetKbdType()));
-        }
-#endif /* DEBUG */
         unsigned scanCode = ::DarwinKeycodeToSet1Scancode(keyCode);
         if (scanCode)
