Ion / FAQ / Entries / Modifier releases
2007-02-04 12:38 UTC

Modifier releases

Ion doesn't notice that a modifier has been released (in actions that use kpress_wait, such as META+C, or in “grabmenus”).

This is most likely to be an X bug/keyboard misconfiguration, when you have changed the “META” key of Ion to Mod4, or something else that supposedly has one of the Win-keys bound to it. For some reason, Xorg comes with some totally broken stock keyboard layouts that define multiple keycodes for the Super_L and such “keysyms”, one of them spurious. However, various parts of X or Xlib can not handle that, and report the wrong keycode when queried.1

To check if this is the case, first run xmodmap to check what key is bound to the Mod4 (or perhaps Mod3 depending on the configuration) modifier. You may see a line like this:

mod4        Super_L (0x7f),  Hyper_L (0x80)

The number 0x7f=127 is the keycode, and this is highly likely the wrong keycode. Check with xmodmap -pke|grep Super_L to see what keycodes have Super_L bound to them. If you see something like this, your keymap is misconfigured:

keycode 115 = Super_L
keycode 127 = NoSymbol Super_L

The keycode 115 is the keycode for the real left Win-key, and 127 is spurious. However, the modifier subsystem only seems to see the latter. Putting the following commands in ~/.Xmodmap and runnning xmodmap ~/.Xmodmap should fix the issue. You may also want/need to repeat this for the other Win-keys (and the possibly completely non-existent Hyper_L above).

remove mod4 = Super_L
keycode 127 = 
add mod4 = Super_L

(The remove command is needed for some reason to not confuse X.) Unless your system configuration is totally weird (and I wouldn't put it past systems built to run Gnome), next time you start X, ~/.Xmodmap should be loaded automatically. On a working modifier configuration running xmodmap should display a line like below (0x73 following Super_L being the important part).

mod4        Super_L (0x73)