For a long time I just thought I was accidentally resetting the numlock, but I only recently realized that, for some reason, whenever I type on the keyboard the numlock turns off, but it doesn’t actually seem to leave the numpad layer. Therefore, I have to press the numlock key twice in order to get back to typing numbers. I’ve been trying to figure something out with USB autosuspend settings, keyboard.frame.work, qmk_hid and so on, but no luck. Has anyone else had this issue and/or knows how to fix it? Everything is on latest versions and I’m running Linux
What OS?
Have you changed your keymap in the numpad?
Do you have any programs or settings that interact with numlock?
Have you noticed it happening while using certain programs?
Numlock is a thing that some programs like to mess with, automatically turning it on or off as the program decides. And numlock status is ultimately controlled within the OS. For the standard numpad keys, it’s actually the OS & even individual programs sometimes that decides how to interpret the keys. For example, the keycode for numpad-digit-8 and numpad-up-arrow is the same, the OS just interprets it differently whether it sees that the numlock is on or off. And an individual can choose to ignore numlock status and always interpret the keys the way it wants. If it is a misbehaving program, it may be possible to create a work-around in qmk, depending on whether numpad-digits/keys are truely needed or if normal keys also work.
It could also be an issue with your numpad keymap. It’s handling of numlock layers has some peculiarities. Could you post screenshots of all your layers from Via (keyboard.frame.work)? I might be able to spot an issue.
Thanks for the response!
NixOS (with Hyprland, if relevant)
Never, I couldn’t even get Via working until recently because of udev
Not as far as I’m aware? I have caps lock mapped to escape but that’s in Hyprland settings and I don’t think that affects numlock
Layer 0
Layer 1
All others are set to entirely pass-through
There’s also a github issue for Hyprland about this specific problem, but I didn’t find it mentioned on here and that has no solutions either.
Are you running the same version of Hyprland? Looks like they list a version slightly beyond v0.42.0, what I see listed for the current stable release. Though, I guess it’s possible the bug could have been introduced earlier and just no one has reported that there yet. 2 of the 4 reports don’t give their version number.
So I guess it’s Hyprland misbehaving.
The fact that you have to press numlock key twice point to Hyprland not even communicating it’s change in numlock status to the FWL16 numpad. I’d suggest trying a numpad indicator app to confirm this. Numlock status is supposed to be communicated to all usb connected keyboards, but Hyprland could just not be doing that. You press numlock, numpad sends numlock off, but that does nothing since Hyprland is bugged and it’s already off, so you have to press again to get it turned on. Iirc internally, within the numpad, the discreet on or off is sent, rather than just “toggle”.
So presuming it is this Hyprland bug, that leaves rolling back to an unbugged version, if that’s a option for you. Or creating a workaround, until Hyprland fixes this. If your usercase does not need actual numlock specific keys, e.g. numpad-digit-1 instead of normal keyboard digit-1 (which is different, and some programs do care), then some QMK/Via workaround should be possible. If you do need numpad specific keys, then you might be stuck, until Hyprland fixes this.