Fluxbox key bindings after switchover to Xorg

02.08.2005 at 21:14

I finally had some time to switch my desktop box over to Xorg. However after the successful upgrade i noticed that my fluxbox key bindings were no longer working. After a while i found out that the ugly Windows-Key, which i am using as a modifier , did no longer work as expected. xmodmap confirmed that:

xmodmap:  up to 2 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x6d)
mod1        Alt_L (0x40)
mod2        Num_Lock (0x4d)
mod3        Mode_switch (0x71)
mod4      
mod5        Scroll_Lock (0x4e)

So first of all i had to look up the keycode of the windows key. This can be done with xev:

KeyRelease event, serial 25, synthetic NO, window 0x1200001,
    root 0x4b, subw 0x1200002, time 3292297, (45,38), root:(108,116),
    state 0x0, keycode 115 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:  ""

Now that we know the keycode we can define our modifier:

xmodmap -e 'keycode 115 = Super_L'
xmodmap -e 'add Mod4 = Super_L'

Now xmodmap should print something like this

xmodmap:  up to 2 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x6d)
mod1        Alt_L (0x40)
mod2        Num_Lock (0x4d)
mod3        Mode_switch (0x71)
mod4        Super_L (0x73)
mod5        Scroll_Lock (0x4e)

And the modifiers should once again work properly. You can add the two xmodmap commands to your ~/.xsession file, this will adjust the settings on every start of the xserver.

cat >> ~/.xsession << "EOF"
xmodmap -e 'keycode 115 = Super_L'
xmodmap -e 'add Mod4 = Super_L'
EOF

Comments (1)

hey

13.07.2007 by Andrew

thanks for the info, teh procedure you described is gonna help me assign my volume keys on my laptop for fluxbox :)

1