2

I am working on a Linux system without X server, so I don't have Xmodmap to change keys on my keyboard. Since the keyboard attached to the Linux PC is a "windows keyboard" (if there is such a thing) with a "windows key" and the right Ctrl key is unhandy to reach, I want to use the windows key for the right Ctrl key.

So this is what I do:

echo keycode 126 = CtrlR     | loadkeys -

I determined the number 126 with showkey.

yet, it doesn't seem to change anything with regards to the behavior of the right windows key.

I am a bit surprised because I was able to switch the Esc and Capslock keys with a similar

echo keycode   1 = Caps_Lock | loadkeys -  
echo keycode  58 = Escape    | loadkeys -
2

You would do this with loadkeys, which requires that you have a keyboard configuration file (which you can get a starting point using dumpkeys).

The hard part, of course, is determining the relationship between the key names in X versus those in the console.

Further reading:

0

The modifiers CtrlL and CtrlR are different columns in the keymap to the usual modifier for generating Control-a and so on. You probably intend to use Control for both left and right control keys, so try

echo keycode 126 = Control     | loadkeys -

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.