This commit is contained in:
Ray Ganardi 2026-01-07 17:36:03 -08:00 committed by GitHub
commit 3b8dcedd19
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 2 deletions

View File

@ -280,7 +280,10 @@ def _parse_keystring(keystr: str) -> Iterator[str]:
yield '>'
assert not key, key
elif c == '<':
special = True
if special:
key += c
else:
special = True
elif special:
key += c
else:

View File

@ -539,7 +539,12 @@ class TestKeySequence:
('<alt+less>',
keyutils.KeySequence(keyutils.KeyInfo(Qt.Key.Key_Less, Qt.KeyboardModifier.AltModifier))),
('<alt+<>', keyutils.KeyParseError),
('<<', keyutils.KeySequence(Qt.Key_Less, Qt.Key_Less)),
('>>', keyutils.KeySequence(Qt.Key_Greater, Qt.Key_Greater)),
('><', keyutils.KeySequence(Qt.Key_Greater, Qt.Key_Less)),
('<alt+<>',
keyutils.KeySequence(Qt.Key_Less | Qt.AltModifier)),
('<alt+>>', keyutils.KeyParseError),
('<blub>', keyutils.KeyParseError),
('<>', keyutils.KeyParseError),