Page 1 of 1

Linux console keymap is busted?

Posted: 10. Feb 2013, 06:41
by ChuckM
Ok, so I've banged my head against the wall here for a while, trying to figure out what is going on with keymaps.

Setup: Win7 Ultimate 64 host
Ubuntu 12.04 LTS Server Guest
VB 4.2.6 (latest)

Setup/Install/Etc all are fine.

Trying to edit a file from the PC console, got into vi and couldn't get out because : was not being typed, through some carefully executed stuff I got networking up and ssh and then could ssh in and that worked as expected and finished setting things up. So everything is fine except this lingering keymap issue.

If I type the keys across the into a VI session this is what I get:
1234567890-=
<tab>qwertyuiopăîâ
asdfghjkl??
zxcvbnm,./

The three keys that are after 'p' are U+103, U+00EE U+00E2 as opposed to []\ the ones after 'l which are ; and ' on the keyboard are something like an S and a 't' with an underline mark. Clearly not my beloved ; and ;.

setupcon(1) didn't help (changed the font though).

Ok, sadly while composing this, I did something silly. I booted up my Raspberry Pi, did a dumpkeys(1) on it, copied that keymap over to my guest instance and did a loadkeys(1) with it. Poof. Problem solved. Uploading the pi.keymap for anyone else who has this issue.
pi-keymap.txt.gz
A copy of the Raspberry Pi Keymap
(26.68 KiB) Downloaded 16 times
A better solution would be nice though.
--Chuck

Re: Linux console keymap is busted?

Posted: 11. Feb 2013, 12:40
by michaln
ChuckM wrote:A better solution would be nice though.
Yes... but what's the problem? What was the keymap, and why? As you probably realize, any talk about keyboard mappings is meaningless unless you specify what the host physical keyboard layout is, what keyboard layout the host uses, and what the guest is set up to use.

Many people don't seem to realize that the pictures on key caps are just that - pictures. Electrically, a (say) UK keyboard is identical to a German or a French keyboard. It's entirely up to software to interpret what's what, and software has no way to tell what the pictures on the key caps are.