Re: [Tutor] how to change the values of keyboard keys in TKINTER
> 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. HTH, Alan G ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] how to change the values of keyboard keys in TKINTER
"brindly sujith" <[EMAIL PROTECTED]> wrote > i want to know how to change the values of keyboard keys(for > example: > I want to set alt+f4 to enter) Can you be more specific? Do you want to change Alt-F4 for every application on the computer permanently or only on a single application? Do you want Alt-F4 to become the Enter key or just to act like one in a specific scenario? > do we have any modules in tkinter for doing this... Not specifically but some of it can be faked. See my event driven programming topic in my tutorial for example code for reading the keys - including Alt-F4. However its worth pointing out that this kind of stuff, and the other things that you are posting are really well outside what Tk was designed for. The Tool Control Language(Tcl) was intended to be an embedded macro language for various lab tools. Similar to Python in that it is a scripting language which can easily interface with other languages and be embedded in them. The Tcl Toolkit (Tcl/Tk) was intended to allow a simple GUI front end to be added to Tcl projects. It was never really intended for writing complex GUI applications, it provides basic GUI capability in a very easy to use package. Tkinter is a thin Python wrapper around Tcl/Tk and has much the same purpose - to provide basic GUI wrapper capability in an easy to use package. It is not a fully featured GUI system like MS Windows or X windows. If you want to do lots of low level control of a GUI you would be better advised to look at toolkits like PyQt or GTK. Even wxPython struggles to provide the low level detailed control that you are looking for. -- Alan Gauld Author of the Learn to Program web site http://www.freenetpages.co.uk/hp/alan.gauld ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] how to change the values of keyboard keys in TKINTER
hi i want to know how to change the values of keyboard keys(for example: I want to set alt+f4 to enter) do we have any modules in tkinter for doing this... plz tell me how we can do this ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor