[PLUG] remapping keys in VGA console
Carlos Konstanski
ckonstanski at pippiandcarlos.com
Sun Aug 21 18:33:08 UTC 2011
On 08/21/2011 11:57 AM, Martin A. Brown wrote:
>
> Greetings,
>
> : I just used xmodmap to remap a key. It works great in X. But not
> : in the VGA console.
>
> That is true. X and the console use two different mechanism for
> remapping keys. It can be wonderfully annoying if you find yourself
> switching layouts from the default.
>
> : I tried editing the file in /usr/share/keymaps (Gentoo system) to
> : no avail. Is this the right place, but maybe I just wasn't doing
> : it right?
>
> I suspect that /usr/share/keymaps on your Gentoo system is the
> location of the console keymap files read by the loadkeys utility
> ('man 1 loadkeys'). You can switch layouts using loadkeys. I use
> the dvorak layout and switch this way:
>
> zcat /usr/share/kbd/keymaps/i386/dvorak/dvorak.map.gz | loadkeys -
>
> : Is there a tool similar to xev that works in non-X shells? Are
> : the kexcodes identical in X and non-X environments?
>
> I do not think that they keycodes are identical; in fact, they seem
> to be two very different worlds. Also, I have never found something
> similar to 'xev', which I admit is remarkably convenient when you
> find yourself messing with this sort of remapping.
>
> Good luck,
>
> -Martin
Thanks, very helpful. The keycodes do not match between X and non-X. I found
that my key mapping did work, but affected the wrong key. It's down to
figuring out the keymaps in VGA mode. I'll look at the kernel source. I
remembering seeing a header file with a keymap in there somewhere.
Carlos
More information about the PLUG
mailing list