xkb for simple remap

Posted by Den Rimus on Ask Ubuntu See other posts from Ask Ubuntu or by Den Rimus
Published on 2014-06-13T14:46:48Z Indexed on 2014/06/13 15:41 UTC
Read the original article Hit count: 425

Filed under:
|
|

I've faced some issues after remapping keyboard with xmodmap: settings get reset randomly after 2-20 minutes after applying. Googled it but no help: something resets them, but all mentions apply to xfce, while I'm under usual 14.04 Ubuntu with unity.

I saw phrases like 'use xkb, forget xmodmap', but still have no idea how to do that. It's either classified or very complicated, because amount of info on that is significantly smaller than for xmodmap way.

Here's my list of customisations:

xmodmap -e "keycode 84 = Down"
xmodmap -e "keycode 79 = Home"
xmodmap -e "keycode 80 = Up"
xmodmap -e "keycode 83 = Left"
xmodmap -e "keycode 85 = Right"
xmodmap -e "keycode 87 = End"
xmodmap -e "keycode 90 = Insert"
xmodmap -e "keycode 91 = Delete"
xmodmap -e "keycode 89 = Next"
xmodmap -e "keycode 81 = Prior"

where keycodes are corresponding keys on numpad, with numlock = off (basically, I'm replacing KP_Del with Delete, KP_Home with Home etc - don't ask why))

Can someone help to find a way to do that using xkb - at least one of the lines? And where to find the "names" of keys for other so I could do the rest by example?

© Ask Ubuntu or respective owner

Related posts about 14.04

Related posts about xmodmap