From c81ccfa1864b38f71bf6e5d4861e8c08a557f4bc Mon Sep 17 00:00:00 2001 From: Joe R Date: Mon, 12 Sep 2022 20:51:36 -0400 Subject: [PATCH] Added Alt+F4 binding for certain environments --- pysollib/ui/tktile/menubar.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pysollib/ui/tktile/menubar.py b/pysollib/ui/tktile/menubar.py index 84f99e2a..8f222a57 100644 --- a/pysollib/ui/tktile/menubar.py +++ b/pysollib/ui/tktile/menubar.py @@ -1,5 +1,6 @@ import math import os +import platform import re import sys @@ -860,6 +861,9 @@ class PysolMenubarTkCommon: self._bindKey(ctrl, "Up", self.mSelectPrevGameById) self._bindKey(ctrl, "Down", self.mSelectNextGameById) + if os.name == 'posix' and platform.system() != 'Darwin': + self._bindKey('Alt-', 'F4', self.mQuit) + # # key binding utility #