Simon Simon - 1 year ago 59
Python Question

Tkinter entry widget always selected for keyboard key presses

I seem to have a hard time figuring this out, I want to always have a entry widget selected for keyboard input. So when I start the application, the widget should be selected for keyboard input, if I press a button the entry widget should still be selected for keyboard input, ect. How to do that?

So if I click another widget or in some other way select another widget the focus should return to the entry widget so that app always will accept keyboard key-presses in entry widget.

Answer Source

This might be helpful to you, checkout the focus_set() method.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download