Bizarre Keyboard Input Mapping While Running Mac guest on Mac host

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
JustinCEO
Posts: 2
Joined: 21. Oct 2018, 22:12

Bizarre Keyboard Input Mapping While Running Mac guest on Mac host

Post by JustinCEO »

Hi all :-)

I'm having the strangest issue running virtualbox with OSX 10.6.6 as the guest on a macOS 10.13.6 host.

Overall it works really well, except for bizarre keyboard mapping which is only partially correct and which makes using the system difficult.

I'm using the more recent magic keyboard but I've tried some older keyboards (including a wired apple keyboard, an older wireless) and they all have similar issues.

examples:
numbers 1 through 9 are fine, but then 0 maps to ö in the guest
asdfghjkl are fine, but then ; is é, ' maps to á and on and on.

this makes the guest mac OS kinda hard to use!

any tips? i've made sure standard US keyboard is selected as the type in the guest macOS
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Bizarre Keyboard Input Mapping While Running Mac guest on Mac host

Post by socratis »

JustinCEO wrote:i've made sure standard US keyboard is selected as the type in the guest macOS
How about in your host? What kind of keyboard do you have? Did you select the appropriate one in the guest? You can't have a different keyboard layout presented to the guest than what you actually have...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
JustinCEO
Posts: 2
Joined: 21. Oct 2018, 22:12

Re: Bizarre Keyboard Input Mapping While Running Mac guest on Mac host

Post by JustinCEO »

on the host its set up as an Apple wireless magic keyboard (that's what it is -- a second gen wireless magic). I think modern macOS just automatically detects what type of keyboard it is so there's basically no set up.

On the ancient guest OS X it did ask me to confirm it was a standard American keyboard and had me hit a couple of keys (to the right and left of the respective shift keys on either side).
Last edited by socratis on 23. Oct 2018, 08:44, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Bizarre Keyboard Input Mapping While Running Mac guest on Mac host

Post by socratis »

JustinCEO wrote:On the ancient guest OS X it did ask me to confirm it was a standard American keyboard and had me hit a couple of keys
That process hasn't changed as far as I know. In any event, in order to force OSX to ask you again for the layout, some people suggested to delete "/Library/Preferences/com.apple.keyboardtype.plist", but that file didn't exist on my real OSX 10.11.6 installation. It did exist on my 10.6 VM.

Looking around I found another file that might do what you want, "/Library/Preferences/com.apple.HIToolbox.plist":

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>AppleCurrentKeyboardLayoutInputSourceID</key>
    <string>com.apple.keylayout.US</string>
    <key>AppleDefaultAsciiInputSource</key>
    <dict>
        <key>InputSourceKind</key>
        <string>Keyboard Layout</string>
        <key>KeyboardLayout ID</key>
        <integer>0</integer>
        <key>KeyboardLayout Name</key>
        <string>U.S.</string>
    </dict>
    <key>AppleEnabledInputSources</key>
    <array>
        <dict>
            <key>InputSourceKind</key>
            <string>Keyboard Layout</string>
            <key>KeyboardLayout ID</key>
            <integer>0</integer>
            <key>KeyboardLayout Name</key>
            <string>U.S.</string>
        </dict>
    </array>
</dict>
</plist>
This seems like the file responsible for this. I deleted both files, and OSX 10.6 asked me for the layout again, on the next reboot.

But this is definitely not a VirtualBox problem, I suggest you treat it like that...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply