How to use setxkbmap to map keys permanently?
7
votes
1
answer
5227
views
I'm currently using
root 0x6a8, subw 0x0, time 14892208, (674,389), root:(848,553),
state 0x0, keycode 97 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
1 - So we have
xmodmap
to remap some keys, keeping my configuration in a .Xmodmap
file, but every time I boot my laptop, or my screen locks, the customization is lost and I have to run xmodmap ~/.Xmodmap
once again, even though I set the command to execute on startup and in the ~/.xinitrc
file too.
I've rummaged about forums looking for information on setxkbmap
, but I can't really understand what's going on, and have trouble trying to remap some keys.
For example, the key on the right of my Right Alt
key, when pressed under xev
, looks like this:
> KeyPress event, serial 37, synthetic NO, window 0x2600001,root 0x6a8, subw 0x0, time 14892208, (674,389), root:(848,553),
state 0x0, keycode 97 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
1 - So we have
keycode 97
and keysym NoSymbol
. How would I map that to be Right Control
using setxkbmap
?
2 - Also, how can I remap the Ctrl + Arrow Keys
to work like Home
/ End
/ PgUp
/ PgDown
?
Most importantly, I want to make these changes **permanent**.
3 - Lastly, is there any comprehensive content or documentation about this program out on the web?
Thank you very much for your time and attention.
Asked by Lucas
(73 rep)
Dec 6, 2022, 10:39 PM
Last activity: Dec 6, 2022, 11:24 PM
Last activity: Dec 6, 2022, 11:24 PM