This question already has an answer here:

I have read the xmodmap documentation. I could only find information on how to bind one key to another.

How do I bind one modifier key to a combination of other modifier keys?

Can I do this using some other software (like autokey)?

marked as duplicate by Thomas Dickey, dr01, Archemar, MelBurslan, PersianGulf Jun 6 '16 at 15:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    What are you trying to achieve? Is the end objective to have Super+foo mapping to ctrl+shift+foo? – terdon Mar 5 '14 at 14:30
  • Using xmodmap, no. But using XKB, I think so. – Gilles Mar 5 '14 at 23:21
  • @terdon Yes.... – Kshitiz Sharma Mar 6 '14 at 5:03
  • @Gilles How so? – Kshitiz Sharma Mar 6 '14 at 5:06

In the xkb_symbols section of your custom layout, add the following:

key <your key> { repeat= no, type= "ONE_LEVEL", symbols[Group1]= [ Hyper_L ], actions[group1]=[ SetMods(modifiers=Shift+Control) ] };

You can replace <your key> by <LWIN> or whatever you want.

For the choice of the symbol Hyper_L, it is the more convenient that I have found. It confuses less softwares than NoSymbol or Control_L or something like that.


Check out the section on RedirectKey here.

This action allow to emulate a pressing of key with anothe scan-code (keycode). [...] Significant difference of this method (using action) is that besides the keycode itself you can specify the set of modifiers that will be included into the key event message instead of the current modifiers set.

Not the answer you're looking for? Browse other questions tagged or ask your own question.