简体   繁体   中英

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.

可能对您有所帮助,检出focus_set()方法。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM