Key bindings don't work when using askopenfilename dialog in tkinter Key bindings don't work when using askopenfilename dialog in tkinter tkinter tkinter

Key bindings don't work when using askopenfilename dialog in tkinter


Bryan's comment held the answer: delaying the open file dialogue until after the window was initialized solved the problem. Instead of opening the file when the app starts, creating a file open method allows the key bindings to work as they should.


If you call root.update() before and after askopenfilename(), the key bindings work.