kb_bind - Bind a key to a tcl script or display bindings
kb_bind event script
kb_bind pattern
Kb_bind binds key events to tcl scripts. (Read the documentation on the bind command in your tcl distribution for event syntax.) If given one argument, a glob pattern, kb_bind prints out all bindings whose event matches that pattern.
kb_bind <Key-F1> {writemud "cast spell"}
Cast a spell when F1 is pressed.
kb_bind %lt;KeyPress> {echo %K}
Print out key events as they occur.
kb_bind <Key-Escape> {config input [subst [config input]]}
Do tcl command, var, and backslash subst on the line of input when escape is pressed.