mooz / xkeysnail

Yet another keyboard remapping tool for X environment
890 stars 112 forks source link

QUESTION: xbindkeys to key.py names, and numpad key codes #130

Closed RedBearAK closed 3 years ago

RedBearAK commented 3 years ago

I'm trying to figure out if it's possible to remap the key codes from the numpad keys, but specifically from the numpad key codes that are active only when Numlock is disengaged.

For instance, I have a laptop with a numpad that has the PgUp/PgDn/Home/End functions on the numpad keys. These key functions don't exist anywhere else on the keyboard. The arrow keys on the main part of the keyboard are dedicated to media functions.

When you use a real PgUp key, xbindkeys shows the key code as "Next". But when you use the numpad PgUp key, xbindkeys shows it as "KP_Next". In other words, "Keypad Next". Some applications are refusing to respond to these keys in the same way that they are responding to a normal PgUp/PgDn/Home/End key on a different keyboard.

I found the regular numpad key names like KPMINUS and KP0-KP9. But there is nothing like "KP_Next" or "KP_Prior" in key.py. I know there are only key names for the base key, not the shifted characters that share that key. So for example you use "Shift-Slash" if a keyboard shortcut uses the question mark, rather than using something like "Question_Mark" which doesn't exist in key.py. But how do you use a key that is activated only when Numlock is off?

I'm also looking for a good resource to more easily link up the key names in key.py with the key names reported by xbindkeys. I did look around the web but couldn't find anything relevant.

RedBearAK commented 3 years ago

Answered my own question. There is currently no way to remap keypad keys differently with Numlock off versus on.