[pygtk] problems with ctrl keybindings
Fabian Braennstroem
f.braennstroem at gmx.de
Fri Mar 16 02:34:07 WST 2007
Hi,
I have some own keybindings for my filemanager, which work pretty
well. Except combinations with the 'Control' key make problems (but
I am pretty sure that they worked before...)
I catch the keys by:
keyname = gtk.gdk.keyval_name(event.keyval)
print "Key %s (%d) was pressed" % (keyname, event.keyval)
from gtk.gdk import CONTROL_MASK, SHIFT_MASK
if keyname == "A":
'do_something'
# and for control combinations
if (keyname == "l" and event.state == gtk.gdk.CONTROL_MASK):
'do_something'
I use pygtk-2.4.1. Does anyone have an idea?
Greetings!
Fabian
More information about the pygtk
mailing list