[pygtk] what key is pressend, key-press-event
Walter Leibbrandt
walter at translate.org.za
Wed Jul 15 17:01:03 WST 2009
nohics nohics wrote:
> I found it, I think that we have to do check the string value returned by:
> gtk.gdk.keyval_name(event.keyval)
Or you can compare event.keyval to the constants defined in gtk.keysyms.
To test for modifiers like control and alt, you can test the set bits in
event.state according to
http://library.gnome.org/devel/pygtk/2.14/gdk-constants.html#gdk-modifier-constants
HTH,
--
Walter Leibbrandt Software Developer
Recent blogs:
* Conquering the CellRendererWidget
http://www.translate.org.za/blogs/walter/en/content/conquering-cellrendererwidget
More information about the pygtk
mailing list