Skip to content

Instantly share code, notes, and snippets.

@felipeborges
Created June 16, 2014 13:55
Show Gist options
  • Save felipeborges/4a7fe34ef69c4baf9c80 to your computer and use it in GitHub Desktop.
Save felipeborges/4a7fe34ef69c4baf9c80 to your computer and use it in GitHub Desktop.
from gi.repository import Gtk
def log_key_events(widget, event):
print(event.get_keyval()[1])
w = Gtk.Window()
w.connect('key-press-event', log_key_events)
w.show()
Gtk.main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment