diff options
author | Florian Bruhin <git@the-compiler.org> | 2015-05-16 12:57:29 +0200 |
---|---|---|
committer | Florian Bruhin <git@the-compiler.org> | 2015-05-16 12:57:29 +0200 |
commit | 137badc77fbf3539befc23ee9edf18631afb5438 (patch) | |
tree | 7df2bd1e493026cf581fdb9440cebac9fd46bd1c /scripts/keytester.py | |
parent | ad338e7a1746877d0a7002ee038b57e58d0fe208 (diff) | |
download | qutebrowser-137badc77fbf3539befc23ee9edf18631afb5438.tar.gz qutebrowser-137badc77fbf3539befc23ee9edf18631afb5438.zip |
Add some more informations to keytester script.
See #658, #420.
Diffstat (limited to 'scripts/keytester.py')
-rw-r--r-- | scripts/keytester.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/keytester.py b/scripts/keytester.py index 5322848f0..dd91c86bc 100644 --- a/scripts/keytester.py +++ b/scripts/keytester.py @@ -39,7 +39,14 @@ class KeyWidget(QWidget): self._layout.addWidget(self._label) def keyPressEvent(self, e): - self._label.setText(utils.keyevent_to_string(e)) + lines = [ + str(utils.keyevent_to_string(e)), + '', + 'key: 0x{:x}'.format(int(e.key())), + 'modifiers: 0x{:x}'.format(int(e.modifiers())), + 'text: {!r}'.format(e.text()), + ] + self._label.setText('\n'.join(lines)) app = QApplication([]) |