Log key IDs in hex

This commit is contained in:
Florian Bruhin 2014-07-03 06:30:50 +02:00
parent a52796e94d
commit 058bab2348
2 changed files with 3 additions and 2 deletions

View File

@ -191,7 +191,7 @@ class BaseKeyParser(QObject):
"""
txt = e.text()
key = e.key()
self._debug_log("Got key: {} / text: '{}'".format(key, txt))
self._debug_log("Got key: 0x{:x} / text: '{}'".format(key, txt))
if key == Qt.Key_Escape:
self._debug_log("Escape pressed, discarding '{}'.".format(

View File

@ -116,7 +116,8 @@ class HintKeyParser(CommandKeyParser):
filter_hints: Emitted when filter string has changed.
keystring_updated: Emitted when keystring has been changed.
"""
logger.debug("Got special key {} text {}".format(e.key(), e.text()))
logger.debug("Got special key 0x{:x} text {}".format(
e.key(), e.text()))
if e.key() == Qt.Key_Backspace:
logger.debug("Got backspace, mode {}, filtertext '{}', keystring "
"'{}'".format(LastPress[self._last_press],