Simon Simon - 21 days ago 7
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

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