key.c: allow numlock to be active with keybinds

This commit is contained in:
Iris Lightshard 2021-11-11 12:00:12 -07:00
parent ba72b72b98
commit 7a8843267f
Signed by: Iris Lightshard
GPG key ID: 3B7FBC22144E6398

200
key.c
View file

@ -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); */