I managed to map the arrow keys, Home, and End to Mode_Switch+Letter (where mode switch is Caps Lock) as explained in this answer:

Bind CAPS+hjkl to arrow keys; CAPS to ESC

though if I want to select text, for example a full line using Shift+End, I cannot do it when using the combination Shift+Mode_Switch+Letter. Is it there a solution?


If you used Solution 2,

following xmodmap documentation:

The first keysym is used when no modifier key is pressed in conjunction with this key, the second with Shift, the third when the Mode_switch key is used with this key and the fourth when both the Mode_switch and Shift keys are used.

add the fourth keysym:

keycode 66 = Mode_switch
keysym h = h H Left Left
keysym l = l L Right Right
keysym k = k K Up Up
keysym j = j J Down Down
keysym u = u U Prior Prior
keysym i = i I Home Home
keysym o = o O End End
keysym p = p P Next Next

  • It works. Thanks for the answer. Now I just need to figure out how to disable layout switching when Mode_switch is pressed in KDE. – Simone Gaiarin Feb 12 '19 at 13:57

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.