From cf4e6831191a92510b4a241af0af282c09ecaa5d Mon Sep 17 00:00:00 2001 From: Philipp Wolfer Date: Fri, 6 Dec 2019 12:45:07 +0100 Subject: [PATCH] PICARD-1312: Enable mnemonics for buttons and other UI elements on macOS On macOS mnemonics are disabled by default. But this also means that many UI elements (e.g. triggering buttons in dialogs) cannot be used with keyboard only as it is possible on other platforms. Enabling this on macOS allows better keyboard navigation for all users consistent across platforms. --- picard/tagger.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/picard/tagger.py b/picard/tagger.py index 92404b555..65a2a985c 100644 --- a/picard/tagger.py +++ b/picard/tagger.py @@ -904,6 +904,9 @@ def main(localedir=None, autoupdate=True): QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps) QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling) + # Enable mnemonics on all platforms, even macOS + QtGui.qt_set_sequence_auto_mnemonic(True) + signal.signal(signal.SIGINT, signal.SIG_DFL) picard_args, unparsed_args = process_picard_args()