KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I've been running a small script like this from Tkinter import * root = Tk() def callback(event): print "callback" w = Canvas(root, width=300, height=300) w.bind("<Key>", callback) w.pack() root.mainloop() However, the keyboard event is not handled in my situation (I use python 2.7 on window 7) If I use w.bind("<Button-1>", callback) Things work fine. So, this really puzzles me. Please anyone tell me why this's happening, thanks in advance.
Tags (comma-separated)
Save Edits
Cancel