tools: print device capabilities in event-debug
authorPeter Hutterer <peter.hutterer@who-t.net>
Sun, 4 Jan 2015 22:36:00 +0000 (08:36 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Sun, 4 Jan 2015 22:57:22 +0000 (08:57 +1000)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
tools/event-debug.c

index 5750bcac64dafc435ceb4c9a3e241e77b60896a4..8fbea24a7766b7922de2b4e78b1481548caaf90e 100644 (file)
@@ -130,6 +130,17 @@ print_device_notify(struct libinput_event *ev)
               libinput_seat_get_physical_name(seat),
               libinput_seat_get_logical_name(seat));
 
+       printf(" cap:");
+       if (libinput_device_has_capability(dev,
+                                          LIBINPUT_DEVICE_CAP_KEYBOARD))
+               printf("k");
+       if (libinput_device_has_capability(dev,
+                                          LIBINPUT_DEVICE_CAP_POINTER))
+               printf("p");
+       if (libinput_device_has_capability(dev,
+                                          LIBINPUT_DEVICE_CAP_TOUCH))
+               printf("t");
+
        if (libinput_device_get_size(dev, &w, &h) == 0)
                printf("\tsize %.2f/%.2fmm", w, h);