I have this output of xmodmap command:

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Caps_Lock (0x42),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_R (0x6c),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)

So I wonder what's super key here? Problem is that when I try to map super key, here I assume mod4 as windows button left to a combine key using sxhkd daemon, it doesn't seem to work, for example, map to open firefox, no effect.

EDIT: I'm trying to use windows left button on the keyboard to quick map some command using sxhkd daemon on archlinux, as discussed in comment, even though I had keycod 133 mod4 = Super_L in .Xmodmap, using mod4 in .config/sxhkd/sxhkdrc to map for example to open firefox:

mod4 + f

this seems doesn't work, press windows lef button and f didn't invoke firefox or me, just print out series of ffffff in terminal.


In response to your first question "I wonder what's super key here": xmodmap can't tell what is the key code is, you have to use the command xev, check xev man for more information.

Call xev from terminal, then click the "super key", after then check the output information in terminal. It will be something like this:

KeyRelease event, serial 37, synthetic NO, window 0x4000001,
    root 0x75, subw 0x0, time 2014984514, (70,-18), root:(82,60),
    state 0x50, keycode 115 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

xev tends to generate a lot of output, especially when you move your mouse over terminal window. You may have to scroll back a while to find the output you're looking for. In the previous output, we see that the super_L has keycode 115.

To check the keyboard mapping, the utility xmodmap can be used for that purpose. Call xmodmap from terminal`, this will print virtual or abstract modifiers (or mod) similar to the table provided in your question.


In the table provided int eh question text, it seems that mod3 is not in use. Windows super key is mapped in mod4 and Hyper_R (or F8) is not mapped at all.

Let's say we would like to map Hyper_R to mod3. We do the following:

  • Call xev from terminal >> press Hyper_R. This will show the following:

    KeyRelease event, serial 37, synthetic NO, window 0x4000001, root 0x75, subw 0x0, time 2188213888, (74,-12), root:(687,178), state 0x10, keycode 74 (keysym 0xffc5, F8), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False

  • Open gedit and type the following:

    clear mod3 keycode 74 = Hyper_R add mod3 =Hyper_R

  • Save this information as a hidden file in your home directory. Name the file .Xmodmap.

  • Log out, then in. After then open terminal and call xmodmap. You must see mod3 maped Hyper_R, and so on for any other mapping purposes. For more complicated mapping purposes you may consider some other tools might be more helpful, see here

Keep in mind:

xmodmap cannot set a key to type key combinations such as CTRL+W

xmodmap cannot set a key to run a script.

xmodmap key cannot change key based on which is current app.

  • 1
    You can have xev mask events and only display keyboard events with -event keyboard. Although even then you get some synthetic keyboard events. – David Foerster Oct 15 '18 at 18:51
  • 1
    So that after do this command xmodmap -pke > ~/.Xmodmap I have to edit ~/.Xmodmap to add a line like keycode 115 = Super_L? – Tuyen Pham Oct 16 '18 at 1:22
  • 1
    @TuyenPham exactly, you got it :-) – user88036 Oct 16 '18 at 1:24
  • Unfortunally, I tried but didn't work, I have like keycode 133 = Super_L already when do the command xmodmap -pke > ~/.Xmodmap but when I try to map using name super or mod4, sxhkd didn't understand. – Tuyen Pham Oct 16 '18 at 15:47
  • Hello @Tuyen Pham, I am happy to assist on this issue. I understood from your question that you are looking for the code of the suppr key. I would suggest that you make additional edits on the question to clarify what is the problem and I am very happy to help you find a solution ;-) – user88036 Oct 16 '18 at 20:06

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.