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
This commit is contained in:
Damien Elmes 2023-11-13 16:09:32 +10:00
parent c478689e5a
commit f2fba6f9e8

View file

@ -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: