Package: suckless-tools Version: 46-2 Severity: minor On my machine with a reconfigured keypad to give the same behavior of the digit row of the keyboard (independently of the NumLock status), Mod-[0..9] works with the keys of the digit row, but not with those of the keypad.
According to xev: [1 on the digit row] state 0x0, keycode 10 (keysym 0x31, 1), same_screen YES, [Ctrl-1 on the digit row] state 0x4, keycode 10 (keysym 0x31, 1), same_screen YES, [1 on the keypad] state 0x0, keycode 87 (keysym 0x31, 1), same_screen YES, XKeysymToKeycode returns keycode: 10 [Ctrl-1 on the keypad] state 0x4, keycode 87 (keysym 0x31, 1), same_screen YES, XKeysymToKeycode returns keycode: 10 The bug sems to be the following: for(i = 0; i < LENGTH(keys); i++) { if((code = XKeysymToKeycode(dpy, keys[i].keysym))) { for(j = 0; j < LENGTH(modifiers); j++) { XGrabKey(dpy, code, keys[i].mod | modifiers[j], w, True, GrabModeAsync, GrabModeAsync); } } } So this will grab only what XKeysymToKeycode gives, thus for 1, it is keycode 10, which corresponds to the key 1 on the digit row, and keycode 87 (on the keypad) is ignored. Instead of the above code, shouldn't it enumerate keycodes and look for all those that match a wanted keysym? -- System Information: Debian Release: bookworm/sid APT prefers unstable-debug APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 'stable-security'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental') merged-usr: no Architecture: amd64 (x86_64) Kernel: Linux 5.18.0-4-amd64 (SMP w/8 CPU threads; PREEMPT) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=POSIX, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages suckless-tools depends on: ii libc6 2.34-5 ii libcap2-bin 1:2.44-1 ii libfontconfig1 2.13.1-4.4 ii libpam0g 1.5.2-2 ii libx11-6 2:1.8.1-2 ii libxft2 2.3.4-1 ii libxinerama1 2:1.1.4-3 ii libxrandr2 2:1.5.2-2+b1 ii libxss1 1:1.2.3-1 suckless-tools recommends no packages. Versions of packages suckless-tools suggests: pn dwm <none> pn stterm <none> pn surf <none> -- no debconf information -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)