[Tutor] how to change the values of keyboard keys in TKINTER

ALAN GAULD alan.gauld at btinternet.com
Wed Jan 16 09:13:10 CET 2008

> i dont want to change alt+f4 for every application on the computer permanently...
> i just want to change it a particular area
> do we have any options for this

In that case all you need to do is to bind the key to the same action as the 
Enter key. Enter usually is a default action so you will likely have to work 
out what that ,means in your context but it should not be too hard.

An alternative might be to write a handler that posts a message onto the Tk 
event queue that looks like it comes from the Enter key, this would then get 
picked up by the mainloop and processed as if Enter had been pressed. 
I think Tk does have a way to do this but I can't remember how and 
don't have time to research it just now.


Alan G

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20080116/c0190236/attachment.htm 

More information about the Tutor mailing list