How to get arrow keys and enter key on key pad in Linux to behave like windows7 How to get arrow keys and enter key on key pad in Linux to behave like windows7 tkinter tkinter

How to get arrow keys and enter key on key pad in Linux to behave like windows7


With this script (from here), it should be easy to identify the key event triggered by Tkinter when you press any key, whether that is <Return>, <KP_Enter>, or (somehow, maybe your keypad has a funny mapping) something else.

Just look at the console output when you press the desired button, and use that key event name in your actual code.

import Tkinterdef callback(e):    print e.keysymw = Tkinter.Frame(width=512, height=512)w.bind("<KeyPress>", callback)w.focus_set()w.pack()w.mainloop()