I have created a program in python(Tkinter) which takes username and password as input and a button which, when pressed, goes through a function which checks the username and password and further runs the program. I want that, rather than clicking the button, user presses the 'Enter' key and that does the function of the button. please help.
For me, the normal binding to a function did not work. Probably because I am using it inside a class, I used the Lambda function and it worked. Here's the code:
inp.bind('', lambda _: show())
Getting values by pressing 'Enter' key rather than clicking a button