13

Trying to swap PgUp and PgDn to Home and End.

xmodmap doesn't seem to work for anything other than xev output. Doesn't work in other cases.

1 Answer 1

21

Using xkb worked.

Edit this file: /usr/share/X11/xkb/symbols/pc. Don't forget to use sudo with something like sudo -i gedit /usr/share/X11/xkb/symbols/pc

It'll be fairly straight forward what's going on in there. Key is defined on the left, and effect is defined on the right. Maintain the indentation and all that.

Should work for any kind of remapping.

You'll need to log out and back in (or use the following commands) for changes to take effect:

setxkbmap fr # if you are using french azerty layout
setxkbmap us # if you are using US qwerty layout
... And so on
3
  • 2
    Doesn't work. I tried remapping ALT key to L_CTRL. Jul 28, 2019 at 6:55
  • 1
    CTRL_L -> ATL_L does not work for me. After some test I think this could be related to my keyboard: a mac keyboard (It's ubuntu on an old mac book air laptop) because it works with an external one. Oct 14, 2019 at 13:15
  • 3
    Used this answer to map PgUp to Left and PgDn to Right on my Dell XPS which has tiny Left and Right keys with tiny PgUp and PgDn keys far too close together! Oct 21, 2019 at 17:22

You must log in to answer this question.

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