key-bindings

How can I bind a key-event to a Python tkinter canvas item?

How can I bind a key-event to a Python tkinter canvas item? Question: I want to bind a key event to a Python tkinter canvas item, for example to a rectangle. I am able to bind a key to the canvas itself (see example code, key "a", "b", "c"), but not to a canvas-item as …

Total answers: 1

How do I bind the enter key to a function in tkinter?

How do I bind the enter key to a function in tkinter? Question: I am a Python beginning self-learner, running on MacOS. I’m making a program with a text parser GUI in tkinter, where you type a command in a Entry widget, and hit a Button widget, which triggers my parse() funct, ect, printing the …

Total answers: 3