Opened 5 years ago
#19332 new defect
keyboard mapping problem on international MacBook Pro keyboard
Reported by: | duco | Owned by: | |
---|---|---|---|
Component: | other | Version: | VirtualBox 6.1.4 |
Keywords: | keyboard keycode mapping | Cc: | |
Guest type: | all | Host type: | Mac OS X |
Description
Keyboard mapping is complex. There are tons of components that have an opinion about what code needs to be mapped to what other code. But when using VirtualBox on MacBook Pro host with an Apple international ISO-like keyboard, something strange happens. The keys labeled "§/±" and "`/~" are not mapped correctly. It do not seem a problem of the guest operating system, it even shows when 'booting' a test virtual machine just into GRUB.
My keyboard layout on the host machine is correctly configured (Dutch) and working.
The key labeled "§/±" (directly below the esc-key in the upper-right corner) assumingly produces the USB HID code 0x64 ("non US\|"). This produces an macos key event with the apple key code 0x0a (and indeed leads to a "§" or "±" when typing on the host OS). The key labeled "/~" (directly right to the left shift key) assumingly produces the the USB HID code 0x64 ("grave-tilde"). This produces an macos key event with apple key code 0x32 and indeed leeds to a '
' or '~' when typing on the host OS.
When typing these keys in a guest, I get '</>' for the '/~' key and '
/~' when typing the "§/±" key.
Confusing indeed. The US ANSI-like MacBook Pro keyboard has no "§/±" key and the "`/~" is where the "§/±" is on an international MacBook Pro.
The problem is not caused by a mapping problem in Linux and/or X running inside the virtual machine. As said, the incorrect mapping is already visible in the GRUB console.
It can be _worked around_, of course, by fiddling with the Linux and/or X mappings, of course. But still I think there is a problem mapping the 'grave\tilde' key on a host MacBook Pro with international keyboard to the proper key in the guest.
screen shot of GRUB in guest