From 137badc77fbf3539befc23ee9edf18631afb5438 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sat, 16 May 2015 12:57:29 +0200 Subject: [PATCH] Add some more informations to keytester script. See #658, #420. --- scripts/keytester.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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([])