I know this has already been asked so many times, but even after searching, I still can't do it.

I simply want to map R_Shift + WASD to the arrow keys (Linux). I can map Shift + WASD to arrows using xmodmap, however, I want only the right shift to have this functionality (while disabling text selection when using R_Shift).

(I have read the xmodmap wiki but can't really understand the way to make this possible.)


After countless minutes of testing, I finally found what I needed.

You need to create an .Xmodmap with the following contents:

keycode 62 = Mode_switch
keysym a = a A Left
keysym d = d D Right
keysym s = s S Down
keysym w = w W Up

62 is the key code of R_Shift.

It works perfectly.

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.