You could try kbindkeys
, numlockx
and a slightly customized keyboard.
Once you install xbindkeys, you have to run it. It will tell you what to do to create the basic configuration.
Then you use xbindkeys -k
to identify the key and modify the configuration file (it's all documented in the default configuration file).
At last, I suggest you run xbindkeys -v -n
to see if everything works. If it does, you can run xbindkeys
for that session and maybe add it to your startup scripts.
In my case, the Windows key (right) does the binding, and my ~/.xbindkeysrc
is:
"numlockx toggle"
m:0x10 + c:134
Mod2 + Multi_key
Now you can add the mappings. You will use the fifth and sixth levels (numlock and shift+numlock).
At the top of /usr/share/X11/xkb/symbols/cz, right after:
default partial alphanumeric_keys
add this snippet:
xkb_symbols "with_numpad" {
include "cz(basic)"
key.type[Group1] = "EIGHT_LEVEL_ALPHABETIC_LEVEL_FIVE_LOCK";
key <AC07> { [ j, J, apostrophe, NoSymbol , 1, 1] };
key <AC08> { [ k, K, lstroke, NoSymbol , 2, 2] };
key <AC09> { [ l, L, Lstroke, NoSymbol , 3, 3] };
};
Now, when you press the window key (right), xkeybind will set numlock, which in turn will make J,K,L and so on return 1,2,3.
Last step, set the new keyboard with:
setxkbmap cz with_numpad
Best Answer
As per xorg docs and archwiki:
i.e.
In your case: