Version 3 of Key-press names

Updated 2002-05-21 20:33:30

Frequently people ask 'what is the value I give to bind for the KKK key' (where KKK is replaced by things like space, tab, etc.)

Here's a line of Tk which will display the names that bind accepts; just press the key and it writes (to stdout) the phrase. Of course, on MacOS or Windows you have to ensure you have a console for the stdout to be displayed (see "How to ensure my Win* or MacOS Tk process has a console").

bind . <Key> {puts "You pressed the key called \"%K\""}