I'm creating a Tkinter-based GUI in Python. I want to let the user interact with the application with hotkeys. I have tried to use this code:
from tkinter import *
def select_all(_event=None):
print("selected")
root = Tk()
root.bind("<Control-A>", select_all)
root.bind("<Control-a>", select_all)
root.mainloop()
But, unfortunately, it doesn't work when non-english layouts are used.
How can I force Tkinter to run callback on "Control+A" keypress for every language layout?