![]() |
|
|
+ Search |
![]()
|
Aug 21st, 2000 18:58
unknown unknown, Richard Chamberlain
from Tkinter import *
root=Tk()
canvas=Canvas(root)
canvas.pack()
def myDullEvent(event):
print "Hallelujah! (is that how you spell it?)"
canvas.bind('<Key-a>',myDullEvent)
canvas.focus_set()
root.mainloop()
The only thing that is slightly tricky about it is that you need to make
sure the canvas has the focus.