aboutsummaryrefslogtreecommitdiff
path: root/wayland.h
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2023-04-11 09:09:03 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2023-04-11 09:09:03 +0200
commitb9b5d5ae2be24d41f3cbd71b9b30338afdb132ee (patch)
treefa7732a6e823ed61d1a9a0e17e7935c978e184d2 /wayland.h
parent76440f53fd9529525e286224e11e918d1e05baf5 (diff)
add ctrl-sequences and custom kmap
Diffstat (limited to 'wayland.h')
-rw-r--r--wayland.h26
1 files changed, 21 insertions, 5 deletions
diff --git a/wayland.h b/wayland.h
index 5d12ac5..7cbbc90 100644
--- a/wayland.h
+++ b/wayland.h
@@ -2,9 +2,29 @@
#define WAYLAND_H
#include <xkbcommon/xkbcommon.h>
+#include <xkbcommon/xkbcommon-keysyms.h>
#include <wayland-client.h>
#include "xdg-shell-client-protocol.h"
+typedef enum {
+ KEY_MOD_NONE = 0,
+ KEY_MOD_CTRL = 1,
+ KEY_MOD_ALT = 2,
+ KEY_MOD_SHIFT = 4,
+ KEY_MOD_LOGO = 8,
+ KEY_MOD_ANY = 16
+} ModMask;
+
+
+typedef struct {
+ uint32_t k;
+ uint32_t mask;
+ char *s;
+ /* three-valued logic variables: 0 indifferent, 1 on, -1 off */
+ signed char appkey; /* application keypad */
+ signed char appcursor; /* application cursor */
+} Key;
+
typedef struct {
struct wl_display *display;
@@ -21,11 +41,7 @@ typedef struct {
struct {
uint32_t state;
uint32_t sym;
- struct {
- uint32_t ctrl;
- uint32_t alt;
- uint32_t shift;
- } mods;
+ uint32_t mod;
} event;
struct {
int timer;