[pygtk] How to add a keyboard shortcut to a widget?
Volker Helm
Helm.volker at gmx.de
Sun Apr 15 17:32:24 WST 2007
Sorry, I don't know how to make this work in gnome.
But as I understand this keyboard shortcut or the gtk.AccelGroup, you have to have an active widget (window for example) on which the shortcut is connected.
So I suppose you have to connect the shortcut to your desktop manager, which give the signal to your widget, so you can set it visible.
Bye,
Volker
-------- Original-Nachricht --------
Datum: Sun, 15 Apr 2007 06:12:15 -0300
Von: "Gabriel Falcão" <gabrielteratos at gmail.com>
An: "David M. Cook" <dave at davidcook.org>, pygtk at daa.com.au
Betreff: Re: [pygtk] How to add a keyboard shortcut to a widget?
> >
> > See
> >
> > http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq23.034.htp
> >
> > Dave Cook
>
>
> I want to connect the keybinding to my egg.TrayIcon()
> I have a invisible window ( window.hide() ), and want to show him when F12
> got pressed.
>
>
> I've tryed to add keybinding to gtk.gdk.get_default_root_window()
> but downt works:
>
> self.desktop = gtk.gdk.get_default_root_window()
> self.deskEvent = gtk.gdk.Event(gtk.gdk.BUTTON_PRESS)
> gtk.binding_entry_add_signal(self.deskEvent, gtk.keysyms.F12,
> gtk.keysyms.Control_L, 'button-press-event')
>
>
> thank you!
> --
> :wq
>
> Atenciosamente
> __________________________________________
> Gabriel Falcão
>
> "Não há um caminho para o Linux, Linux é o caminho! "
>
> Jabber: gabrielfalcao at jabber.org
> Blog: http://www.nacaolivre.org
> Skype: gabrielteratos
> GPG public key: http://www.nacaolivre.org/gabrielteratos.gpg
>
> -----BEGIN GEEK CODE BLOCK-----
> Version: 3.12
> GCA d-- s++: a--- C++++ UL++ P+ L++++ E- W++ N* o-- K- w---
> O-- M+ V- PS+ PE++ Y+++ PGP++ t+ 5 X R+ tv-- b- DI-- D+++
> G++ e+ h! r+++ y++
> ------END GEEK CODE BLOCK------
--
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
More information about the pygtk
mailing list