2

I know I need xmodmap and have been playing around with it but can't find the right configuration.

➜  ~  xmodmap
xmodmap:  up to 3 keys per modifier, (keycodes in parentheses):

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

This is the XF86Explorer key

➜  ~  xev
KeyPress event, serial 40, synthetic NO, window 0x6e00001,
    root 0x7d, subw 0x0, time 4306448, (-253,-217), root:(592,324),
    state 0x0, keycode 152 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x6e00001,
    root 0x7d, subw 0x0, time 4306598, (-253,-217), root:(592,324),
    state 0x40, keycode 152 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

My keyboard does not have a Super button which is why I want the Explorer button to act as my Super button.

1
  • I'm guessing I need to do something like xmodmap -e "Super_L = XF86Explorer" , but that does not work. Sep 4, 2015 at 10:46

1 Answer 1

1
  1. Open the file ~/.Xmodmap

    nano ~/.Xmodmap
    
  2. Place your mapping, eg.:

    keycode 152 = Super_L
    
  3. Test it

    xmodmap ~/.Xmodmap
    
  4. Open the file ~/.xinitrc

    nano ~/.xinitrc
    
  5. Add the lines below

    if [ -s ~/.Xmodmap ]; then
        xmodmap ~/.Xmodmap
    fi
    
  6. Logout and re-login

If ~/.xinitrc does not work then use ~/.profile in step 4 and repeat step 5.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .