mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-06 17:18:09 +02:00
tools/replay: improve the verbose output a bit
Make sure our SYN_REPORT line is indented correctly for multi-device replay and match the output a bit closer to the one from libinput record. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1286>
This commit is contained in:
parent
936cee2242
commit
59f0d8f647
1 changed files with 14 additions and 11 deletions
|
|
@ -154,20 +154,23 @@ def create(device):
|
||||||
def print_events(devnode, indent, evs):
|
def print_events(devnode, indent, evs):
|
||||||
devnode = os.path.basename(devnode)
|
devnode = os.path.basename(devnode)
|
||||||
for e in evs:
|
for e in evs:
|
||||||
print(
|
if e.type != libevdev.EV_SYN:
|
||||||
"{}: {}{:06d}.{:06d} {} / {:<20s} {:4d}".format(
|
print(
|
||||||
devnode,
|
"{}: {}{:-6d}.{:06d} {} / {:<20s} {:6d}".format(
|
||||||
" " * (indent * 8),
|
devnode,
|
||||||
e.sec,
|
" " * (indent * 8),
|
||||||
e.usec,
|
e.sec,
|
||||||
e.type.name,
|
e.usec,
|
||||||
e.code.name,
|
e.type.name,
|
||||||
e.value,
|
e.code.name,
|
||||||
|
e.value,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
if e.type == libevdev.EV_SYN:
|
if e.type == libevdev.EV_SYN:
|
||||||
print(
|
print(
|
||||||
"{}: ------------------------------------------------".format(devnode)
|
"{}: {}----------------- SYN_REPORT ({}) -----------------".format(
|
||||||
|
devnode, " " * (indent * 8), e.value
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue