summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2014-11-18 11:16:24 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2014-11-20 08:11:40 +1000
commit3178a3ae75111b18f9667582a3c338ac33c78cd4 (patch)
tree3ed276ec10e17a7174b7d3f60daccf59e3e9856d
parentc7bf6fb0e27a70f315ea9dcab79e9b62595f616e (diff)
downloadlibinput-3178a3ae75111b18f9667582a3c338ac33c78cd4.tar.gz
tools: print config options for each device on DEVICE_ADDED
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r--tools/event-debug.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/event-debug.c b/tools/event-debug.c
index fb22f3bd..00882bfa 100644
--- a/tools/event-debug.c
+++ b/tools/event-debug.c
@@ -257,6 +257,7 @@ print_device_notify(struct libinput_event *ev)
struct libinput_device *dev = libinput_event_get_device(ev);
struct libinput_seat *seat = libinput_device_get_seat(dev);
double w, h;
+ uint32_t scroll_modes;
printf("%s %s",
libinput_seat_get_physical_name(seat),
@@ -265,7 +266,28 @@ print_device_notify(struct libinput_event *ev)
if (libinput_device_get_size(dev, &w, &h) == 0)
printf("\tsize %.2f/%.2fmm", w, h);
+ if (libinput_device_config_tap_get_finger_count((dev)))
+ printf(" tap");
+ if (libinput_device_config_buttons_has_left_handed((dev)))
+ printf(" left");
+ if (libinput_device_config_scroll_has_natural_scroll((dev)))
+ printf(" scroll-nat");
+ if (libinput_device_config_calibration_has_matrix((dev)))
+ printf(" calib");
+
+ scroll_modes = libinput_device_config_scroll_get_modes(dev);
+ if (scroll_modes != LIBINPUT_CONFIG_SCROLL_NO_SCROLL) {
+ printf(" scroll");
+ if (scroll_modes & LIBINPUT_CONFIG_SCROLL_2FG)
+ printf("-2fg");
+ if (scroll_modes & LIBINPUT_CONFIG_SCROLL_EDGE)
+ printf("-edge");
+ if (scroll_modes & LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN)
+ printf("-button");
+ }
+
printf("\n");
+
}
static void