[Gtk-sharp-list] Grabbing a specific-key globally
Miguel de Icaza
miguel at ximian.com
Mon Aug 1 11:21:24 EDT 2005
Hello,
> I want my application to perform a certain action when a certain key is
> pressed, no matter if the application is currently focused or not. The
> actual thing I want to do is to assign a shortcut key for certain
> forms in my application, so it is very possible that no form of the
> application is focused (or visible, for that manner) when the shortcut
> key is pressed. I would like to be able to define the key and its
> modifiers. The way I see it, is that there should be a way to assign a
> delegate to a key using some kind of a "GrabKey" method, perhaps part
> of gdk, that receives the key, the modifiers, the lock-level (global
> or application-only) and the delegate. However, I did not find any
> method like that.
Look at the source code for Tomboy, it does that.
Miguel.
More information about the Gtk-sharp-list
mailing list