0
root.bind("<Control-Alt-g><f9>", close_app)

I tried multiple things but I just want the function to start when the keys are pressed, when I removed the f9 it worked, but it doesn't now. I don't know what to do.

1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. Commented Jan 9, 2025 at 20:18

1 Answer 1

0

The only way I found to bind multiple keys or combinations is to bind them separately:

root.bind("<Control-Alt-g>", close_app)
root.bind("<F9>", close_app)
# Rest of the code
root.mainloop()
answered Jan 11, 2025 at 21:31
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.