+ guint mods, initial_mods;
+
+ initial_mods = obt_keyboard_only_modmasks(initial_state);
+ mods = obt_keyboard_only_modmasks(e->xkey.state);
+ if (e->type == KeyRelease) {
+ /* remove from the state the mask of the modifier key being
+ released, if it is a modifier key being released that is */
+ mods &= ~obt_keyboard_keyevent_to_modmask(e);
+ }
+