[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Custom keymappings



Hi,

I have a laptop with a broken keyboard (g, h and several vital symbols
are untypeable). I previously had Red Hat 5.2 on this machine and had
configured the keyboard into a usable state by editing a file called
uk.map (the laptop has a uk keyboard layout). This file had entries
like:

keycode  33 = f
keycode  34 = g
...

I was able to add lines like:

control keycode  33 = g
shift control keycode  33 = G
control keycode  36 = h
shift control keycode  36 = H
...

This enabled me to type g by pressing Ctrl+F and h by Ctrl+J, and worked
pretty well.

By experimentation, I've found that a debian system can load such a file
by using "loadkeys" - eg "loadkeys uk.map".

I have a couple of problems with this approach:

- A few of the mappings don't seem to have taken effect: Debian still
seems to think that Ctrl+J is newline, although Ctrl+F works fine to
print a "G". Also it doesn't seem to have honored the mapping of AltGr
(right alt on a UK keyboard) to regular Alt (needed because my left alt
key is one of the broken ones).

- I need to make this happen on every boot, so I'd have to put it in an
init.d script. That's hacky.

- It doesn't seem to be the "debian way" to do such things. I'd rather
stick to the debian way if I can so as not to be broken by future
upgrades.

Does anyone know the debian way to do this, or at least what I can do to
workaround the "Ctrl+J is always newline" problem.

Thanks,
Stuart.



Reply to: