summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorArthur Williams <taaparthur@gmail.com>2021-09-20 07:17:35 +0200
committerNRK <nrk@disroot.org>2021-09-20 07:17:35 +0200
commit3234b0e521cca006a94cb135a88d146122d7f66d (patch)
tree9e4ec3d2580e9b38eb48f16436975a63a8e6c7ea /main.c
parent24e70a99e38ba71ac26e8476c5f2d4352c6ff548 (diff)
downloadnsxiv-3234b0e521cca006a94cb135a88d146122d7f66d.tar.zst
Allow any set of modifiers to be used in keybindings
Previous the code only allowed ShiftMask,ControlMask or Mod1Mask to be used in keybindings and the presence of any others modifiers would be ignored. Most problems generally allow certain modifiers to be be ignored but not most and certainly don't allow Super-A to be treated like A. Now users can use any modifiers they want in keybindings and can also ignore any modifiers they want. By default only ModMask2 (commonly numlock is ignored) Co-authored-by: N-R-K <79544946+N-R-K@users.noreply.github.com>
Diffstat (limited to 'main.c')
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index 52062ca..7c58594 100644
--- a/main.c
+++ b/main.c
@@ -566,7 +566,7 @@ end:
redraw();
}
-#define MODMASK(mask) ((mask) & (ShiftMask|ControlMask|Mod1Mask))
+#define MODMASK(mask) ((mask) & ~ignore_mask)
void on_keypress(XKeyEvent *kev)
{