Python Frequently Asked Questions, Release 3.9.5 73 7.4. Tkinter questions 7.4.3 I can’t get key bindings to work in Tkinter: why? 7.4.2 Can I have Tk events handled while waiting for I/O? On platforms other than Windows, yes, and you don’t even need threads! But you’ll have to restructure your I/O code a bit. Tk has the equivalent of Xt’s$_{XtAddInput()}$ call, which allows you to register a callback function which will be called from the Tk mainloop when I/O is possible on a file descriptor. See tkinter-file-handlers. An often-heard complaint is that event handlers bound to events with the bind() method don’t get handled even when the appropriate key is pressed. The most common cause is that the widget to which the binding applies doesn’t have “keyboard focus”. Check out the Tk documentation for the focus command. Usually a widget is given the keyboard focus by clicking in it (but not for labels; see the takefocus option).