aboutsummaryrefslogtreecommitdiffstats
path: root/kbd.c
diff options
context:
space:
mode:
Diffstat (limited to 'kbd.c')
-rw-r--r--kbd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kbd.c b/kbd.c
index 9ef8d3e..ff29c6e 100644
--- a/kbd.c
+++ b/kbd.c
@@ -275,6 +275,7 @@ int kbd_read(char *buf, uint32_t len,
{
struct libinput_event *evt;
struct libinput_event_keyboard *kbd;
+ struct libinput_event_pointer *ptr;
int rc;
memset(buf, 0, len);
@@ -294,6 +295,11 @@ int kbd_read(char *buf, uint32_t len,
/* TODO: track modifier state */
/* TODO: fill buf with typed chars */
break;
+ case LIBINPUT_EVENT_POINTER_BUTTON:
+ ptr = libinput_event_get_pointer_event(evt);
+ if (libinput_event_pointer_get_button_state(ptr))
+ *keycode = libinput_event_pointer_get_button(ptr);
+ break;
default:
/* ignore event */
break;