[xmonad] xmonad and remapping keys with xmodmap

wagnerdm at seas.upenn.edu wagnerdm at seas.upenn.edu
Fri Jan 18 15:45:26 CET 2013

Quoting Ico <xmonad at zevv.nl>:

> - I remap the numpad arrows to send 'Left' instead of KP_Left':
>   xmodmap -e "keycode 83 = Left Left"
>   ...
> - Xmonad now works with the keypad left arrow key, but the normal arrow
>   key (that was not remapped) is no longer picked up by xmonad. It works
>   for all other apps I tested, though. xev shows the normal key symbols
>   when pressing the keys.

Yeah, that's a bit annoying. The culprit is that xmonad asks X to  
convert keysyms into keycodes, then binds keycodes instead of keysyms.  
This is subtly a bug because many keycodes may map to the same keysym,  
in which case X will choose one arbitrarily to return from the  
conversion. You might be interested in


which even has a patch you might want to try applying to xmonad core.  
Spencer is skeptical about the patch, but it looks like just what the  
doctor ordered to me.


More information about the xmonad mailing list