I recently moved from laptop to desktop. But I have a problem.

I bought a cheap chinamade keyboard. However, this keyboard package said, that is was good for german keymap. Upon inspection, it turns out, that it doesn't have the greater-than,less-than and pipe key .

enter image description here

See image,see the key between left shift and y key - that key is missing.

I know I can buy another keyboard, but in the spirit of unix, i would like to remap the capslock key to the missing key.

I looked at the file : /usr/share/X11/xkb/symbols/de

But, got pretty confused.please help.

1 Answer 1


If you are running X and not Wayland, using xmodmap instead of xkbd will be a lot easier (though people will tell you that xmodmap is deprecated, but people have been telling this for a decade, and it's still there).

Very briefly: Run xmodmap -pke, find keycode for capslock and greater/less key, run xmodmap -e 'keycode 123 = ..., where 123 is the keycode for capslock, and ... is the definition for the greater/less key.

If it works, put the line into ~/.Xmodmap, ~/.Xkeyboard or whatever your display manager reads upon login.

  • 1
    @Sean You also need clear Lock in the .Xmodmap file, otherwise the key will still sometimes be interpreted as CapsLock and keyboard shortcuts involving pressing that key would fail sometimes. Jun 6, 2017 at 23:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .