Like many smaller machines, my laptop's keyboard is missing a dedicated numpad.
I can generally type without looking at my keyboard, but I am unable to blindly type numbers with the number row. That's why I thought of converting the left side of my keyboard into a second-level numpad (e.g. Z = 0, X = 1. C = 2, V = 3, S = 4 and so on).
Another advantage would be the possiblity to quickly type numbers without taking the right hand off the mouse or moving the left hand across the entire keyboard.
Now I'm looking for a way to remap those keys to "create" the numpad, at best independent of the desktop environment, as I'm using multiple ones constantly. Also, it would be amazing if that mapping was portable, so I could set it up once and enable it for different keyboards/machines.
I know that it's possible to modify the keymap directly inside /usr/share/X11/xkb/symbols/
, but those allow only three modifiers (Shift, AltGr (on European keyboards) and Shift + AltGr) and they're usually in use on the letter keys or require both hands to activate.
I thought of using either Super_L or a combination of Shift_L + Alt as modifier keys to access the numpad layer, since those combinations shouldn't be in use and are easy to reach with one hand.
How could this be accomplished?
I am into custom keyboards running QMK and such which allows to redefine every key and allows advanced behaviours such as layers. I recentley came across Kmonad which is a software tool which allows most of the same features. I haven't tried it myself, but this should allow you to hold down or toggle a key to activate a layer on which you can map numbers to the left side of the keyboard.
Here is a link to the github; https://github.com/david-janssen/kmonad
I think Kmonad is also included in a lot of recent distros so it might already be available in APT.
You have already mentioned that you can edit
/usr/share/X11/xkb/symbols/
, I think that this is the most portable option and the one that has worked for me in many linux distributions without needing to install anything. I found some issues in Android Studio but not with the numpad. Most software including browsers and DuckDuckGo work as intended.If you are willing to give another try, I use Alt Gr and the right hand for the numpad. I use the left hand for other keys like Home, End, del... and these are even more useful than the numpad for me.
Create a new language making a file like
/usr/share/X11/xkb/symbols/aa
based on the language you normally use.in the file
/usr/share/X11/xkb/rules/evdev.xml
before
</layoutlist>
add this textAnd choose that language as your default one. Below the one I use, based on
xkb/symbols/gb
If you use Windows machines, Autohotkey is your friend. You probably know that, since you are familiar with Autokey.