Python Forum
easygui use enter instead of ok - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: GUI (https://python-forum.io/forum-10.html)
+--- Thread: easygui use enter instead of ok (/thread-30074.html)



easygui use enter instead of ok - udihamudi - Oct-03-2020

Hi guys, sorry newbe question- is there a way to dismiss easygui dialog by pressing enter on the keyboard rather than clicking "ok" (or some other button) with the mouse? if not out of the box, and you have a hack, tell me :)

Thanks!
Udi


RE: easygui use enter instead of ok - Larz60+ - Oct-03-2020

Easygui appears to be a wrapper around tkinter which is the GUI included with python.
I wouldn't use it myself, as tkinter is fairly easy to use, butthat's me.
I expect you will get a quicker answer from the authors about your problem
You can find them here: https://pypi.org/project/easygui/


RE: easygui use enter instead of ok - deanhystad - Oct-04-2020

I am surprised that <Enter> does not press a button. A quick peek at easygui shows dialog boxes with "default button" decoration on one of the buttons. The decoration is used to indicate which button is pressed if you type <Enter>. To select a different button you press the tab key.