summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetar Kapriš <petarkapris@firemail.cc>2021-07-18 00:14:00 +0200
committerrafa_99 <raroma09@gmail.com>2021-07-19 22:01:56 +0100
commit15972670742a6982335e4baf643ddf8963202424 (patch)
tree8c845440686c1a3bab59e90f49cac47dc01b0aa7
parent60a0860e32d09dfb943d31f1e7159f5b604bc5d5 (diff)
Add 14th bit to XK_SWITCH_MOD bitmask
The bits of uint signal in an XKeyEvent which concern the key group (keyboard layout) are bits 13 and 14, as documented here: https://www.x.org/releases/X11R7.7/doc/libX11/XKB/xkblib.html#Groups_and_Shift_Levels In the older version, only bit 13 was marked as part of XK_SWITCH_MOD, this causes issues for users who have more than two keymaps. the 14th bit is not in ignoremod, key sequences are not caught by match(), if they switch to a third or fourth keyboard.
-rw-r--r--x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/x.c b/x.c
index 8debce5..432da40 100644
--- a/x.c
+++ b/x.c
@@ -48,7 +48,7 @@ typedef struct {
/* X modifiers */
#define XK_ANY_MOD UINT_MAX
#define XK_NO_MOD 0
-#define XK_SWITCH_MOD (1<<13)
+#define XK_SWITCH_MOD (1<<13|1<<14)
/* function definitions used in config.h */
static void clipcopy(const Arg *);