Changing non-printing keys in keyboard layout

Dotan Cohen dotancohen at
Sun May 8 14:47:28 PDT 2011

Hi all, I'm trying to write a new keyboard layout to help with a
manual disability. I have no problems moving the letters around but
the non-printing character keys are being tenacious:

How does one map Enter to a different key? The following did not have
any effect:
key <AC05> { [ enter                      ] };

How does one prevent Capslock from being activated when the physical
Capslock key is reassigned to a letter? I have the following:
key <CAPS> { [ a,             A           ] };
However, repeatedly pressing that key results in this output:
This is because in addition to the letter, the caps state is being toggled!

I have a similar issue with Shift, assigning it to Z and pressing the
key results in both a Z _and_ a shift being activated:
key <LFSH> { [ z,             Z           ] };

How does one assign Caps Lock? The following did not have any effect:
key <AB05> { [ caps_Lock   ] };

How does one assign Esc? The following did not have any effect:
key <AE05> { [ escape                     ] };

I'm currently using Debian Squeeze with KDE. It is important to solve
this issue with a keyboard layout as opposed to playing with the
scancodes and keycodes because there are other users of the system and
the computer needs to be able to switch on the fly to standard US,
Hebrew, and Russian layouts.


Dotan Cohen

More information about the xorg mailing list