Open StefanDeYoung opened 4 years ago
Added a text file of the keys that hopefully can be easily changed into an "if elif elif elif" or similar block.
Excellent! In terms of writing the elif chain, I think it would look like this:
def keybinds(event):
if event.char.lower() == 'a':
my_function()
elif event.char.lower() == 'b':
my_other_function()
button = tk.Button(parent)
button.bind("<Key>", keybinds)
button.pack()