Well, by definition, the event then doesn`t take place in that window at all. Perhaps you want to get a key event when the pointer is over a particular window, even if that window doesn`t have focus. You`d need to grab the pointer and process its events in order to get such a key event.
No. I would like to catch the event even if i don`t have the pointer inside the window. I have a multi-window application, and there is a kind of action that operators need to do often, and pressing a button would be the easiest way.
Well, by definition, the event then doesn`t take place in that window at all. Perhaps you want to get a key event when the pointer is over a particular window, even if that window doesn`t have focus. You`d need to grab the pointer and process its events in order to get such a key event.
No. I would like to catch the event even if i don`t have the pointer inside the window. I have a multi-window application, and there is a kind of action that operators need to do often, and pressing a button would be the easiest way.
Then you need to do the sort of passive grab on keys that window managers do, assuming you can do so without conflicting with the window manager.