From f2fba6f9e89fc1a7e15adea88126fd828e27a86a Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 13 Nov 2023 16:09:32 +1000 Subject: [PATCH] Don't restrict answer key shortcuts Qt seems to handle invalid input gracefully, and the previous approach prevented things like umlauts or keys with modifiers. https://forums.ankiweb.net/t/bug-cannot-set-answer-key-to-german-umlaut/37091 --- qt/aqt/preferences.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/qt/aqt/preferences.py b/qt/aqt/preferences.py index f705652d8..b8ddfa3b3 100644 --- a/qt/aqt/preferences.py +++ b/qt/aqt/preferences.py @@ -70,11 +70,6 @@ class Preferences(QDialog): line_edit.textChanged, functools.partial(self.mw.pm.set_answer_key, ease), ) - line_edit.setValidator( - QRegularExpressionValidator( - QRegularExpression(r"^[a-z0-9\]\[=,./;\'\\-]$") - ) - ) line_edit.setPlaceholderText(tr.preferences_shortcut_placeholder()) def accept(self) -> None: