I am trying to assign "control" to my Super R key in /usr/share/X11/xkb/symbols/pc.

So, I change

key <RWIN> { [ Super_R ] }


key <RWIN> { [ Control_R ] }

Then I start X and use xev to verify that the change took place. Indeed, xev reports Control_R when I press my right "super" (windows) key.

However, when I want to use ctrl-c or ctrl-d by pressing the right super key and c or d, respectively, a program is not stopped nor is a shell exited. It works as always when I use the left control key.

If I exit X and also change

key <RCTL> { [ Control_R ] }


key <RCTL> { [ Super_R ] }

and then start X again, the right super key behaves as the control key. However, the right control key does not behave as control anymore, which is undesired by me.

So, I am wondering why the first change did not bring the desired keyboard changes about and how I can assign control functionality to the right super key.

  • If you are using X (and not Wayland), and simpler way may be to use xmodmap. XKB is a bit complicated, and if you meddle with existing files, all your changes will be gone the next time you update the corresponding package. The proper way using XKB is to add your own keyboard layout. – dirkt Mar 1 '18 at 14:58
  • You have to define a new xkb option, see my post here.. There is already an option that does what you want but it's for both Super keys: altwin:ctrl_win so all you have to do is edit the file /usr/share/X11/xkb/symbols/altwin and add a new option like e.g. ctrl_rwin that maps control only to right super. Just copy the code from ctrl_win and remove the LWIN stuff, the rest is in my post over there (your case is easier as you just edit existing files, you don't need to create a new file). – don_crissti Mar 1 '18 at 18:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.