Bind ctrl+w to quit.

This commit is contained in:
voussoir 2023-10-29 12:13:29 -07:00
parent 07f2c8ab63
commit 80c390653f

View file

@ -28,6 +28,7 @@ def showqr_argparse(args):
root.title("QR code") root.title("QR code")
root.bind('<Escape>', lambda *args, **kwargs: root.quit()) root.bind('<Escape>', lambda *args, **kwargs: root.quit())
root.bind('<Control-s>', lambda *args, **kwargs: save_image(root, image)) root.bind('<Control-s>', lambda *args, **kwargs: save_image(root, image))
root.bind('<Control-w>', lambda *args, **kwargs: root.quit())
tk_image = PIL.ImageTk.PhotoImage(image) tk_image = PIL.ImageTk.PhotoImage(image)
tkinter.Label(root, image=tk_image).grid(row=0, column=0) tkinter.Label(root, image=tk_image).grid(row=0, column=0)