Open Jahfry opened 2 months ago
I have a working but somewhat kludgy solution worked out.
details here in case anyone finds this from a search looking for similar.
I would like to improve the solution if there's something I can do based on the questions at top.
- Is there a way to force 'numlock' to always be toggled on? Even if reconnecting a USB numpad during a session.
[...]
I could avoid the problem in "1." above (wanting to force numlock ON) if I knew what to remap in 'keyd' to say "when numlock is off and '7 / home' is pressed, send 'kp7'".
Numlock is implemented at the display server level. When you press the numlock key, numlock
is emitted and the display server flips a bit of state which is used to decide how to interpret the raw kp1
, kp2
, etc keycodes.
Since keyd operates at the level of the keycode, what you want to achieve should be as simple as remapping the numlock codes to their corresponding numbers:
[main]
kp1 = 1
kp2 = 2
kp3 = 3
kp4 = 4
kp5 = 5
kp6 = 6
kp7 = 7
kp8 = 8
kp9 = 9
I'm working up a guide for getting 'keyd' to run on a Steam Deck as a World of Warcraft macro pad in both Desktop and Game mode and have a few questions.
To further explain, for game macro pad usage I am using the NumLock as one of the macro keys (not really sending a macro at this point, just remapping it to send a different key so that it can be bound in the game). So I want the number keys with alternate functions when numlock isn't ON to still just always send the kp# code ... regardless of numlock LED state on the numpad.
Is there a way to force 'numlock' to always be toggled on? Even if reconnecting a USB numpad during a session.
I could avoid the problem in "1." above (wanting to force numlock ON) if I knew what to remap in 'keyd' to say "when numlock is off and '7 / home' is pressed, send 'kp7'".
Examples:
sudo keyd monitor
shows the key being pressed as "kp7" but the actual key registered is the "home" function