xev
will show you output like this:
KeyRelease event, serial 36, synthetic NO, window 0x3200001,
root 0x530, subw 0x0, time 4335057, (943,136), root:(943,694),
state 0x0, keycode 78 (keysym 0xff14, Scroll_Lock), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
sudo -E nvim /usr/share/X11/xkb
and search for<I78>
(this is the keycode)- It is “mapped” to some amount of characters
- Change each character to whatever you want to remap to
- You can figure out the name of the character by once again doing
xev
, but now looking for the character name (would beScroll_Lock
in this case) - I thought you need to reboot to make it update, but restarting xremap does the same thing, for whatever reason
xremap
interprets the raw keycodes, not they keysyms they result into, so you can't use this method to remap something into being supported by xremap.
You can also run xremap like: RUST_LOG=debug xremap config-path.yml
to make it yell out keys you're pressing, in case you just wanna check the name of the actual key you have.
If it doesn't yell out some key after you press it, it means it doesn't support that one :(