suggestion picker: a persistent layer to complement virtual keyboards like wvkbd
| -rw-r--r-- | keyboard.c | 7 | ||||
| -rw-r--r-- | keyboard.h | 5 | ||||
| -rw-r--r-- | main.c | 1 |
3 files changed, 1 insertions, 12 deletions
@@ -1,4 +1,3 @@ -#include <linux/input-event-codes.h> #include <stdio.h> #include <sys/mman.h> #include "keyboard.h" @@ -162,11 +161,7 @@ kbd_draw_layout(struct kbd *kb) { next_key++; continue; } - if (next_key->type == Mod && kb->mods & next_key->code) { - kbd_draw_key(kb, next_key, Press); - } else { - kbd_draw_key(kb, next_key, Unpress); - } + kbd_draw_key(kb, next_key, Unpress); next_key++; } } @@ -61,11 +61,6 @@ struct key { const double width; // relative width (1.0) const enum key_type type; - const uint32_t - code; /* code: key scancode or modifier name (see - * `/usr/include/linux/input-event-codes.h` for scancode names, and - * `keyboard.h` for modifiers) - * XKB keycodes are +8 */ struct layout *layout; // pointer back to the parent layout that holds this // key const uint32_t code_mod; /* modifier to force when this key is pressed */ @@ -1,5 +1,4 @@ #include "proto/wlr-layer-shell-unstable-v1-client-protocol.h" -#include <linux/input-event-codes.h> #include <stdio.h> #include <stdlib.h> #include <string.h> |