aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Stevens <nilix@nilfm.cc>2021-11-11 12:00:12 -0700
committerDerek Stevens <nilix@nilfm.cc>2021-11-11 12:00:12 -0700
commit7a8843267f77fa917fb021254a39c958d7e86450 (patch)
tree7b27e149972c8a8b84214fca0068080b166604e0
parentba72b72b980e58c0f2822010bc105fba49b4380f (diff)
key.c: allow numlock to be active with keybinds
-rw-r--r--key.c200
1 files changed, 200 insertions, 0 deletions
diff --git a/key.c b/key.c
index da9be5b..42d98b4 100644
--- a/key.c
+++ b/key.c
@@ -104,6 +104,14 @@ void keysetup(void) {
0,
GrabModeSync,
GrabModeAsync);
+ XGrabKey(
+ dpy,
+ tabcode,
+ Mod1Mask | Mod2Mask,
+ screens[i].root,
+ 0,
+ GrabModeSync,
+ GrabModeAsync);
#ifdef DESTROY_KEY
XGrabKey(
dpy,
@@ -113,6 +121,14 @@ void keysetup(void) {
0,
GrabModeSync,
GrabModeAsync);
+ XGrabKey(
+ dpy,
+ dcode,
+ SHORTCUTMOD | Mod2Mask,
+ screens[i].root,
+ 0,
+ GrabModeSync,
+ GrabModeAsync);
#endif
#ifdef ICON_KEY
XGrabKey(
@@ -123,6 +139,14 @@ void keysetup(void) {
0,
GrabModeSync,
GrabModeAsync);
+ XGrabKey(
+ dpy,
+ icode,
+ SHORTCUTMOD | Mod2Mask,
+ screens[i].root,
+ 0,
+ GrabModeSync,
+ GrabModeAsync);
#endif
#ifdef UNHIDE_KEY
XGrabKey(
@@ -133,6 +157,14 @@ void keysetup(void) {
0,
GrabModeSync,
GrabModeAsync);
+ XGrabKey(
+ dpy,
+ ucode,
+ SHORTCUTMOD | Mod2Mask,
+ screens[i].root,
+ 0,
+ GrabModeSync,
+ GrabModeAsync);
#endif
#ifdef RESIZE_KEY
XGrabKey(
@@ -143,6 +175,14 @@ void keysetup(void) {
0,
GrabModeSync,
GrabModeAsync);
+ XGrabKey(
+ dpy,
+ rcode,
+ SHORTCUTMOD | Mod2Mask,
+ screens[i].root,
+ 0,
+ GrabModeSync,
+ GrabModeAsync);
#endif
#ifdef MOVE_KEY
XGrabKey(
@@ -153,6 +193,14 @@ void keysetup(void) {
0,
GrabModeSync,
GrabModeAsync);
+ XGrabKey(
+ dpy,
+ vcode,
+ SHORTCUTMOD | Mod2Mask,
+ screens[i].root,
+ 0,
+ GrabModeSync,
+ GrabModeAsync);
#endif
#ifdef MAX_KEY
XGrabKey(
@@ -163,6 +211,14 @@ void keysetup(void) {
0,
GrabModeSync,
GrabModeAsync);
+ XGrabKey(
+ dpy,
+ mcode,
+ SHORTCUTMOD | Mod2Mask,
+ screens[i].root,
+ 0,
+ GrabModeSync,
+ GrabModeAsync);
#endif
#ifdef STICK_KEY
XGrabKey(
@@ -173,6 +229,14 @@ void keysetup(void) {
0,
GrabModeSync,
GrabModeAsync);
+ XGrabKey(
+ dpy,
+ scode,
+ SHORTCUTMOD | Mod2Mask,
+ screens[i].root,
+ 0,
+ GrabModeSync,
+ GrabModeAsync);
#endif
#ifdef SNAPLEFT_KEY
XGrabKey(
@@ -183,6 +247,14 @@ void keysetup(void) {
0,
GrabModeSync,
GrabModeAsync);
+ XGrabKey(
+ dpy,
+ hcode,
+ SHORTCUTMOD | Mod2Mask,
+ screens[i].root,
+ 0,
+ GrabModeSync,
+ GrabModeAsync);
#endif
#ifdef SNAPRIGHT_KEY
XGrabKey(
@@ -193,6 +265,14 @@ void keysetup(void) {
0,
GrabModeSync,
GrabModeAsync);
+ XGrabKey(
+ dpy,
+ lcode,
+ SHORTCUTMOD | Mod2Mask,
+ screens[i].root,
+ 0,
+ GrabModeSync,
+ GrabModeAsync);
#endif
#ifdef SNAPBOTTOM_KEY
XGrabKey(
@@ -203,6 +283,14 @@ void keysetup(void) {
0,
GrabModeSync,
GrabModeAsync);
+ XGrabKey(
+ dpy,
+ jcode,
+ SHORTCUTMOD | Mod2Mask,
+ screens[i].root,
+ 0,
+ GrabModeSync,
+ GrabModeAsync);
#endif
#ifdef SNAPTOP_KEY
XGrabKey(
@@ -213,6 +301,14 @@ void keysetup(void) {
0,
GrabModeSync,
GrabModeAsync);
+ XGrabKey(
+ dpy,
+ kcode,
+ SHORTCUTMOD | Mod2Mask,
+ screens[i].root,
+ 0,
+ GrabModeSync,
+ GrabModeAsync);
#endif
#ifdef SNAPTOPLEFT_KEY
XGrabKey(
@@ -223,6 +319,14 @@ void keysetup(void) {
0,
GrabModeSync,
GrabModeAsync);
+ XGrabKey(
+ dpy,
+ qcode,
+ SHORTCUTMOD | Mod2Mask,
+ screens[i].root,
+ 0,
+ GrabModeSync,
+ GrabModeAsync);
#endif
#ifdef SNAPBOTTOMLEFT_KEY
XGrabKey(
@@ -233,6 +337,14 @@ void keysetup(void) {
0,
GrabModeSync,
GrabModeAsync);
+ XGrabKey(
+ dpy,
+ wcode,
+ SHORTCUTMOD | Mod2Mask,
+ screens[i].root,
+ 0,
+ GrabModeSync,
+ GrabModeAsync);
#endif
#ifdef SNAPBOTTOMRIGHT_KEY
XGrabKey(
@@ -243,6 +355,14 @@ void keysetup(void) {
0,
GrabModeSync,
GrabModeAsync);
+ XGrabKey(
+ dpy,
+ ocode,
+ SHORTCUTMOD | Mod2Mask,
+ screens[i].root,
+ 0,
+ GrabModeSync,
+ GrabModeAsync);
#endif
#ifdef SNAPTOPRIGHT_KEY
XGrabKey(
@@ -253,6 +373,14 @@ void keysetup(void) {
0,
GrabModeSync,
GrabModeAsync);
+ XGrabKey(
+ dpy,
+ pcode,
+ SHORTCUTMOD | Mod2Mask,
+ screens[i].root,
+ 0,
+ GrabModeSync,
+ GrabModeAsync);
#endif
#ifdef SNAPCENTER_KEY
XGrabKey(
@@ -271,6 +399,22 @@ void keysetup(void) {
0,
GrabModeSync,
GrabModeAsync);
+ XGrabKey(
+ dpy,
+ ccode,
+ ShiftMask | SHORTCUTMOD | Mod2Mask,
+ screens[i].root,
+ 0,
+ GrabModeSync,
+ GrabModeAsync);
+ XGrabKey(
+ dpy,
+ ccode,
+ SHORTCUTMOD | Mod2Mask,
+ screens[i].root,
+ 0,
+ GrabModeSync,
+ GrabModeAsync);
#endif
#ifdef PREVVIRT_KEY
XGrabKey(
@@ -281,6 +425,14 @@ void keysetup(void) {
0,
GrabModeSync,
GrabModeAsync);
+ XGrabKey(
+ dpy,
+ leftcode,
+ SHORTCUTMOD | Mod2Mask,
+ screens[i].root,
+ 0,
+ GrabModeSync,
+ GrabModeAsync);
#endif
#ifdef NEXTVIRT_KEY
XGrabKey(
@@ -291,6 +443,14 @@ void keysetup(void) {
0,
GrabModeSync,
GrabModeAsync);
+ XGrabKey(
+ dpy,
+ rightcode,
+ SHORTCUTMOD | Mod2Mask,
+ screens[i].root,
+ 0,
+ GrabModeSync,
+ GrabModeAsync);
#endif
#ifdef LAUNCH_KEY
XGrabKey(
@@ -301,6 +461,14 @@ void keysetup(void) {
0,
GrabModeSync,
GrabModeAsync);
+ XGrabKey(
+ dpy,
+ slcode,
+ SHORTCUTMOD | Mod2Mask,
+ screens[i].root,
+ 0,
+ GrabModeSync,
+ GrabModeAsync);
#endif
#ifdef ZOOM_KEY
XGrabKey(
@@ -311,6 +479,14 @@ void keysetup(void) {
0,
GrabModeSync,
GrabModeAsync);
+ XGrabKey(
+ dpy,
+ zcode,
+ SHORTCUTMOD | Mod2Mask,
+ screens[i].root,
+ 0,
+ GrabModeSync,
+ GrabModeAsync);
#endif
XGrabKey(
dpy,
@@ -320,6 +496,14 @@ void keysetup(void) {
0,
GrabModeSync,
GrabModeAsync);
+ XGrabKey(
+ dpy,
+ tabcode,
+ Mod1Mask | ShiftMask | Mod2Mask,
+ screens[i].root,
+ 0,
+ GrabModeSync,
+ GrabModeAsync);
#ifdef DEVEL
XGrabKey(
dpy,
@@ -337,6 +521,22 @@ void keysetup(void) {
0,
GrabModeSync,
GrabModeAsync);
+ XGrabKey(
+ dpy,
+ tcode,
+ SHORTCUTMOD | Mod2Mask,
+ screens[i].root,
+ 0,
+ GrabModeSync,
+ GrabModeAsync);
+ XGrabKey(
+ dpy,
+ bcode,
+ SHORTCUTMOD | Mod2Mask,
+ screens[i].root,
+ 0,
+ GrabModeSync,
+ GrabModeAsync);
#endif
/* XGrabKey(dpy, pgupcode, Mod1Mask, screens[i].root, 0, GrabModeSync,
* GrabModeAsync); */