How to tell if a key has been released in tkinter How to tell if a key has been released in tkinter tkinter tkinter

How to tell if a key has been released in tkinter


This will call onkeyrelease when any key is released:

w.bind("<KeyRelease>", onkeyrelease)

To react to a particular key's release, you would use

w.bind("<KeyRelease-key>", onkeyrelease_of_key)

where key should be replaced by the name of the key.