[PATCH libinput 15/15] tools: print tool capabilities on proximity
Peter Hutterer
peter.hutterer at who-t.net
Tue Feb 17 21:45:16 PST 2015
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
tools/event-debug.c | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/tools/event-debug.c b/tools/event-debug.c
index dcf1dae..37d344c 100644
--- a/tools/event-debug.c
+++ b/tools/event-debug.c
@@ -439,6 +439,38 @@ print_proximity_event(struct libinput_event *ev)
printf("%s (%#x) %s",
tool_str, libinput_tool_get_serial(tool), state_str);
+
+ printf("\taxes:");
+ if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_DISTANCE))
+ printf("d");
+ if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_PRESSURE))
+ printf("p");
+ if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_TILT_X) ||
+ libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_TILT_Y))
+ printf("t");
+ if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_ROTATION_Z))
+ printf("r");
+ if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_SLIDER))
+ printf("s");
+
+ printf("\tbtn:");
+ if (libinput_tool_has_button(tool, BTN_TOUCH))
+ printf("T");
+ if (libinput_tool_has_button(tool, BTN_STYLUS))
+ printf("S");
+ if (libinput_tool_has_button(tool, BTN_STYLUS2))
+ printf("S2");
+ if (libinput_tool_has_button(tool, BTN_LEFT))
+ printf("L");
+ if (libinput_tool_has_button(tool, BTN_MIDDLE))
+ printf("M");
+ if (libinput_tool_has_button(tool, BTN_RIGHT))
+ printf("R");
+ if (libinput_tool_has_button(tool, BTN_SIDE))
+ printf("Sd");
+ if (libinput_tool_has_button(tool, BTN_EXTRA))
+ printf("Ex");
+
printf("\n");
}
--
2.1.0
More information about the wayland-devel
mailing list