diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2019-01-18 12:48:15 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-01-18 12:48:15 +0100 |
commit | 2692e11168fec90673d21caf2c811cadbf63d2be (patch) | |
tree | d5beba488080a6e90cbb39fc0bcd3d6585340603 /kbd.c | |
parent | 1eeeaefecb634ea734059685648c058dd600bcae (diff) | |
download | fbida-2692e11168fec90673d21caf2c811cadbf63d2be.tar.gz |
libinput: mouse button support
Diffstat (limited to 'kbd.c')
-rw-r--r-- | kbd.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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; |