how to get a key_press_event for unfocussed windows?



Hi there,
I have this screencam application and would like to make it start/stop/pause recording at certain keyboard shortcuts. After playing around with mnemonics which didn't work for me because the buttons don't show their text-lables I managed to connect a callback
to the key_press_event on the application's top-level window.

Now, that works OK if the application has keyboard focus, but, of course, for a screencam application it probably won't have keyboard focus when I want to stop recording (and if I need to give it keyboard focus with the mouse I can just as well click on the stop button).

Is there a way to catch the key press from an unfocused (perhaps even iconified) window?
Without the help of the window manager?

All tips and hints appreciated,

Karl.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]