suggestion picker: a persistent layer to complement virtual keyboards like wvkbd
-rw-r--r--keyboard.c7
-rw-r--r--keyboard.h5
-rw-r--r--main.c1
3 files changed, 1 insertions, 12 deletions
diff --git a/keyboard.c b/keyboard.c
index 85f412f..ee50827 100644
--- a/keyboard.c
+++ b/keyboard.c
@@ -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++;
}
}
diff --git a/keyboard.h b/keyboard.h
index 82a3763..7d61bee 100644
--- a/keyboard.h
+++ b/keyboard.h
@@ -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 */
diff --git a/main.c b/main.c
index 17e8885..602dc6f 100644
--- a/main.c
+++ b/main.c
@@ -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>