aboutsummaryrefslogtreecommitdiff
path: root/include/rootston/keyboard.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/rootston/keyboard.h')
-rw-r--r--include/rootston/keyboard.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/rootston/keyboard.h b/include/rootston/keyboard.h
new file mode 100644
index 00000000..33017b56
--- /dev/null
+++ b/include/rootston/keyboard.h
@@ -0,0 +1,22 @@
+#ifndef _ROOTSTON_KEYBOARD_H
+#define _ROOTSTON_KEYBOARD_H
+
+#include <xkbcommon/xkbcommon.h>
+#include "rootston/input.h"
+
+#define ROOTS_KEYBOARD_PRESSED_KEYSYMS_CAP 32
+
+struct roots_keyboard {
+ struct roots_input *input;
+ struct wlr_input_device *device;
+ struct wl_listener key;
+ struct wl_listener modifiers;
+ struct wl_list link;
+
+ xkb_keysym_t pressed_keysyms[ROOTS_KEYBOARD_PRESSED_KEYSYMS_CAP];
+};
+
+void keyboard_add(struct wlr_input_device *device, struct roots_input *input);
+void keyboard_remove(struct wlr_input_device *device, struct roots_input *input);
+
+#endif