search box wont accept the letter w
kosh66 opened this issue · comments
Just been playing around with the customtklinter code. When typing an address if I press the 'w' key the app closes immediately. Can't see any obvious reason why in the code.
I just encountered the exact same problem, and found the source. I suppose that, like me, you started working from the example map_with_customtkinter.py
.
There, line 21 and 22 are the culprit:
self.bind("<Command-q>", self.on_closing)
self.bind("<Command-w>", self.on_closing)
'Command' is not a recognized key modifier for tkinter, so these two lines of code erroneously cause just the keys 'Q' and 'W' to close the window. I believe the author of the example instead meant to write
self.bind("<Control-q>", self.on_closing)
self.bind("<Control-w>", self.on_closing)
which will bind the key combinations Ctrl+Q and Ctrl+W to close the window instead, and then the search box works as intended.
thanks