[Tkinter-discuss] some key symbols
Fredrik Lundh
fredrik at pythonware.com
Mon Jun 19 15:42:34 CEST 2006
Ilknur Ozturk wrote:
> I am using keyboard to send the parameters to my functions.
> (event.keysym), but some of the keys are not working. Those are +, - and
> Break. The keysym for those keys in Tkinter book are defined as /Add,
> Subtruct/ and /Cancel . /Is there anyone else who knows the correct
> symbols?
plus, minus, and Cancel sounds more likely.
here's a little program that prints the keysym when you press a key:
import Tkinter
def callback(e):
print e.keysym, repr(e.char)
w = Tkinter.Frame(width=512, height=512)
w.bind("<KeyPress>", callback)
w.focus_set()
w.pack()
w.mainloop()
</F>
More information about the Tkinter-discuss
mailing list