Jun-21-2018, 03:36 PM
Just like how you can bind keys to the widget, is it possible to bind certain key clicks that are performed when a certain window is open to a certain action?
Suppose, you want to focus between your widgets using arrow keys.
Googling didn't help but was wondering if you guys have any lead. Is this possible with tkinter at all? What are the alternatives?
If it's not possible, what are plausible alternatives? Presumably having a loop that constantly checks for whether a key is pressed and whether a window is active would be very resource tedious.
Also, forgetting the GUI aspect, how would you efficiently define hotkeys in Python? I assume there's a better way than a loop that checks the button's state every fraction of a second..
Suppose, you want to focus between your widgets using arrow keys.
Googling didn't help but was wondering if you guys have any lead. Is this possible with tkinter at all? What are the alternatives?
If it's not possible, what are plausible alternatives? Presumably having a loop that constantly checks for whether a key is pressed and whether a window is active would be very resource tedious.
Also, forgetting the GUI aspect, how would you efficiently define hotkeys in Python? I assume there's a better way than a loop that checks the button's state every fraction of a second..