Request for Manmower (Bindings and Keygrabbing)

Ava Arachne Jarvis ajar at katanalynx.dyndns.org
Sat Feb 15 14:58:53 EST 2003


In xOr's stackedcycle.py, there's a grab with a keycallback function,
such that certain extra keystrokes can be used to cancel/activate the
window cycling menu.  The way this all works is that an initial call to
the callback (when not currently cycling) is made, which creates a
cycling menu and shows that, and then grabs the keyboard.  When you've
made your selection or canceled, the keyboard is ungrabbed, the menu is
popped down, and everything is back to normal.

This works fine if you don't use key-chains to bind to that particular
function -- then the appropriate callbacks for cycling up and down are
still registered.

For instance, if I bind 'Alt-Tab' to 'cycle forwards' and
'Alt-Shift-Tab' to 'cycle backwards', those callbacks still get called,
and the hilight of the cycling menu is moved upwards or downwards,
respectively.

However, if I bind a keychain instead, those are not registered for the
duration of the keyboard grab.  

I.e., if I bind 'Windows-g Windows-v' to 'cycle forwards', I can't use 
'Windows-g Windows-v' during the keyboard grab to call up the 'cycle
forwards' callback to navigate down the menu.

I think this is because key chains aren't propagated when keyboard grab
is on, in the Bindings::fire method in bindings.cc, but I could be
horribly wrong; I'm not familiar enough with Xlib weirdness to tell for
sure.  But I figured you'd know.  :) 


-- 
| A word to the wise is enough.
| 		-- Miguel de Cervantes



More information about the openbox mailing list