diff options
author | Florian Bruhin <me@the-compiler.org> | 2022-04-01 12:34:21 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2022-04-01 12:34:21 +0200 |
commit | 71c9500ea8780ec79d93667c43b40aa2a85a4ccc (patch) | |
tree | 21223a81a5a1bc1213110c8612790c239f4a7327 | |
parent | c9d76675eb197ab88ad3b88073cb11a3a3b9bb18 (diff) | |
download | qutebrowser-qt6-test.tar.gz qutebrowser-qt6-test.zip |
Store raw key in modeman.KeyEventqt6-test
We don't know if this is a valid Qt.Key at this point.
See #7045 and #7047
-rw-r--r-- | qutebrowser/keyinput/modeman.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qutebrowser/keyinput/modeman.py b/qutebrowser/keyinput/modeman.py index 53f7354c8..61d4d73c8 100644 --- a/qutebrowser/keyinput/modeman.py +++ b/qutebrowser/keyinput/modeman.py @@ -50,17 +50,17 @@ class KeyEvent: press/release. Attributes: - key: A Qt.Key member (QKeyEvent::key). + key: Usually a Qt.Key member, but could be other ints (QKeyEvent::key). text: A string (QKeyEvent::text). """ - key: Qt.Key + key: int text: str @classmethod def from_event(cls, event: QKeyEvent) -> 'KeyEvent': """Initialize a KeyEvent from a QKeyEvent.""" - return cls(Qt.Key(event.key()), event.text()) + return cls(event.key(), event.text()) class NotInModeError(Exception): |