keyboard - Excluding some keys from XGrabKeyboard -


To capture all the window manager commands (Alt + F4 and whatnot) to capture the keyboard, consider the desired application ) for processing. Now, it is a downside to the user that there is no way to switch the keyboard through a keyboard on another application or virtual desktop, when the keyboard is captured. I want to make a user-defined whitelist of key combination (say, the key combination for switching virtual desktops), which are excluded from grabbing.

I can think of two possible approaches. When a whitelisted key occurs, then

  1. Either way, say x to continue it normally, it's a more natural way of doing this, but I have to do this Can not find the path, or
  2. Open the keyboard and resend the window manager for processing, however, I do not know where to send it (the root window?) Or it will also work. Can anyone fill the vacancy on them? Any other suggestions?

    If there is no way to take out the keys by grabbing, then I think that I have to arrange for the "key of escape" which will ungraze the pressed keyboard. The user has to press both that and then the window manager command, however, which is not as good.

I do not think there is a way to do this. None of the mechanisms required you to do a lot.

Approach 1 is that what window manager does if he decides to stop a click or key for example, however, hold the "idle" on the WM special key (Xgrabbi = Passive XGrabKeyboard = active) Taking and then XAlOVVantas (). XAllowEvents () does not work with XGrabKeyboard (), even when you re -play XAllowEvents with the game mode, the replayed event grabs all the idle on the window which was the original grab and windows on all your parents. The WM hold will be placed on the root window, which will always be a parent, so there is no way to run the root window again, the best I can tell. XGrabKey on every possible key would be psychological in any way.

There will be a problem of poor running conditions in Approach 2, because before you can send again, other key and mouse events can be processed, so that you can reorder the key, deleted Send events to windows and other illusions Besides, there is no good way to send an important event. XSendEvent () is ignored by many clients (this sets a send_event flag with permission of the event) The XTest extension can be used but the output can be disabled on the X server and still the status of the race conditions

What you probably need is a protocol extension that prevents you from holding a permissions (mode = replaybox) after the grubby and inactive on the parent windows. Without having to do it.

One of the warnings is that I do not know all wild things that can be done with XKB and XInput2, so maybe there is something in those extensions.

However, as far as I know that you "key to escape", though it would eventually be good for "VMWare / VNC-type-thing awareness" for X server and / or window manager specs. , Which will not help you in the short-term. An EWMH speck extension can be as easy as a new _NET_WM_WINDOW_TYPE for vnc / vmware / stuff-like-, and the window manager can reduce its keybinding or add additional modifiers Can add or answer For Ahrn when it was focused on the window.


Comments