Reserving key combinations for special clients

Peter Hutterer peter.hutterer at who-t.net
Sun Dec 6 17:23:33 PST 2009


On Sun, Dec 06, 2009 at 01:08:37PM +0200, Alex Dănilă wrote:
> I would like to make it possible for window managers to reserve a couple
> of key combinations no matter what other applications do. Specifically I
> want keys/combinations like Alt+Tab, Ctrl+Alt+Del, XF86VolumeUp to never
> be taken away by fulscreen apps that grab the keyboard(ex. Boswars) or by
> missbehaving/frozen apps.
> 
> In my understanding, I would need to make two changes:
> 
> -from X provide a way for an application to reserve keys forever
> 
> -modify the window manager (and maybe the service that replies to ex.
>  XF86VolumeUp) such that it makes use of the reservation method.
> 
> What are a few alternatives for doing this? Which is the easiest, which is
> the most correct one? 
> 
> I can understand if this is not how things work in X, and it is no problem
> if such a patch (if ever created) would never be accepted. I will give it
> some time anyway. Thank you for your time.

I think the better option is to introduce grab priorities for passive grabs.
this way the WM can register grabs with a higher priority than default and
these grabs are triggered even if a device is already grabbed.
this has the potential to be more future-proof than having reserved key
combinations.

the tricky bit is sorting out these grab priorities in light of the core
protocol - assuming all core grabs are on a default priority.

Cheers,
  Peter


More information about the xorg-devel mailing list