mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-24 21:40:34 +01: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.
(cherry picked from commit 59f0d8f647)
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1309>
This commit is contained in:
parent
936cee2242
commit
f80504a366
1 changed files with 14 additions and 11 deletions
|
|
@ -154,20 +154,23 @@ def create(device):
|
|||
def print_events(devnode, indent, evs):
|
||||
devnode = os.path.basename(devnode)
|
||||
for e in evs:
|
||||
print(
|
||||
"{}: {}{:06d}.{:06d} {} / {:<20s} {:4d}".format(
|
||||
devnode,
|
||||
" " * (indent * 8),
|
||||
e.sec,
|
||||
e.usec,
|
||||
e.type.name,
|
||||
e.code.name,
|
||||
e.value,
|
||||
if e.type != libevdev.EV_SYN:
|
||||
print(
|
||||
"{}: {}{:-6d}.{:06d} {} / {:<20s} {:6d}".format(
|
||||
devnode,
|
||||
" " * (indent * 8),
|
||||
e.sec,
|
||||
e.usec,
|
||||
e.type.name,
|
||||
e.code.name,
|
||||
e.value,
|
||||
)
|
||||
)
|
||||
)
|
||||
if e.type == libevdev.EV_SYN:
|
||||
print(
|
||||
"{}: ------------------------------------------------".format(devnode)
|
||||
"{}: {}----------------- SYN_REPORT ({}) -----------------".format(
|
||||
devnode, " " * (indent * 8), e.value
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue