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
To avoid the "clicking on the canvas to activate the key bindings", I found simpler code at the following site:
http://ubuntuforums.org/showthread.php?t=1378609
He is attempting to bind a frame, but I implemented it in my own code and the canvas widget works as well. Your code will look like the following:
w.focus_set()
w.bind(, callback)