From f7ec25115caf0ff0c17275571f740748becfcc3e Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Fri, 2 Dec 2022 18:12:56 +0100 Subject: Sketching ideas. --- schewm.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'schewm.c') diff --git a/schewm.c b/schewm.c index 53919bd..e4c52fe 100644 --- a/schewm.c +++ b/schewm.c @@ -8,6 +8,20 @@ #include #include +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. -- cgit v1.2.3