summaryrefslogtreecommitdiff
path: root/schewm.c
diff options
context:
space:
mode:
authorSamuel Fadel <samuel@nihil.ws>2022-12-02 18:12:56 +0100
committerSamuel Fadel <samuel@nihil.ws>2022-12-02 18:12:56 +0100
commitf7ec25115caf0ff0c17275571f740748becfcc3e (patch)
tree27214eb106bc4f05a7a630707c5c3b9d4b09c291 /schewm.c
parent21ebd4dda267d09c60d8b646782aed28138c5690 (diff)
Sketching ideas.
Diffstat (limited to 'schewm.c')
-rw-r--r--schewm.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/schewm.c b/schewm.c
index 53919bd..e4c52fe 100644
--- a/schewm.c
+++ b/schewm.c
@@ -8,6 +8,20 @@
#include <xcb/xcb_keysyms.h>
#include <X11/keysym.h>
+static uint16_t mod_key = XCB_MOD_MASK_4;
+static const uint16_t SHIFT = XCB_MOD_MASK_SHIFT;
+
+void wm_set_mod_key(uint16_t mod) {
+ mod_key = mod;
+}
+
+uint16_t wm_get_mod_key(bool with_shift) {
+ if (with_shift) {
+ return mod_key | SHIFT;
+ }
+ return mod_key;
+}
+
/*
* Array of (internal) event handlers. They cast the event pointer to
* the proper type and call the custom handlers defined in Scheme.