You'll find it discussed in a couple of places in the PySimpleGUI documentation.
For example, this was written about it under the Button Element section of the
The ENTER key :
The ENTER key is an important part of data entry for windows. There's a long
tradition of the enter key being used to quickly submit windows. PySimpleGUI
implements this by tying the ENTER key to the first button that closes or reads
The Enter Key can be "bound" to a particular button so that when the key is
pressed, it causes the window to return as if the button was clicked. This is
done using the bind_return_key parameter in the button calls.
If there are more than 1 button on a window, the FIRST button that is of type
Close window or Read window is used. First is determined by scanning the
window, top to bottom and left to right.
When questions like this arise on PySimpleGUI, I recommend pulling up the docs
and pressing Control-F to do a search.
From: Matthew Polack
Sent: Sunday, April 28, 2019 4:49 AM
Subject: [Tutor] What does 'Bind Return Key' do?
We're learning Python with PySimpleGUi and have used this example program...
There is a mystery command that says:
[sg.ReadButton('Submit', bind_return_key = False)]]
If I change this 'Bind_Return_Key' value from False to True...or in fact delete
it entirely, it appears to make do difference whatsoever to the functioning of
the program that I can see...
Could someone explain what the purpose of this could be? I'm guessing it has to
have a reason to be there!
**Disclaimer: *Whilst every attempt has been made to ensure that material
contained in this email is free from computer viruses or other defects, the
attached files are provided, and may only be used, on the basis that the user
assumes all responsibility for use of the material transmitted. This email is
intended only for the use of the individual or entity named above and may
contain information that is confidential and privileged. If you are not the
intended recipient, please note that any dissemination, distribution or copying
of this email is strictly prohibited. If you have received this email in error,
please notify us immediately by return email or telephone +61 3 5382 2529** and
destroy the original message.*
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options: