Fix scripts.keytester
This commit is contained in:
parent
362f923f06
commit
c0e2550046
@ -25,7 +25,7 @@ Use python3 -m scripts.keytester to launch it.
|
|||||||
|
|
||||||
from PyQt5.QtWidgets import QApplication, QWidget, QLabel, QHBoxLayout
|
from PyQt5.QtWidgets import QApplication, QWidget, QLabel, QHBoxLayout
|
||||||
|
|
||||||
from qutebrowser.utils import utils
|
from qutebrowser.keyinput import keyutils
|
||||||
|
|
||||||
|
|
||||||
class KeyWidget(QWidget):
|
class KeyWidget(QWidget):
|
||||||
@ -41,7 +41,7 @@ class KeyWidget(QWidget):
|
|||||||
def keyPressEvent(self, e):
|
def keyPressEvent(self, e):
|
||||||
"""Show pressed keys."""
|
"""Show pressed keys."""
|
||||||
lines = [
|
lines = [
|
||||||
str(utils.keyevent_to_string(e)),
|
str(keyutils.keyevent_to_string(e)),
|
||||||
'',
|
'',
|
||||||
'key: 0x{:x}'.format(int(e.key())),
|
'key: 0x{:x}'.format(int(e.key())),
|
||||||
'modifiers: 0x{:x}'.format(int(e.modifiers())),
|
'modifiers: 0x{:x}'.format(int(e.modifiers())),
|
||||||
|
Loading…
Reference in New Issue
Block a user