i'm new with Python & PySimpleGUI and i don't know how to force my application to handle the event key; this is my code:
# Text field
sg.InputText(
key=key,
default_text='',
enable_events=True,
),
...
window = self.graphic_interface.window
while self.is_running:
self.event, self.values = window.read(timeout=0)
...
if event in INSERT_SN_KEYS:
key = event
if values[key]is not None:
# Accept only numbers
if values[key][-1] not in '0123456789':
window[key].update(values[key][:-1])
My code can handle any key pressed by user except ; i haven't found any argument for InputText similar to "bind_return_key=True" used into Button class. How can i do it? Thanks