Permanently change one key mapping in keyboard layout

That file is owned by a package so it will always be re-written when the package is updated.

You can copy the file and make your changes. If you call it sk_mine then use it like this setxkbmap sk_mine.

It’s temporary, see the link for making it permanent. Add to that, if the keyboard is external and is re-plugged then udev will override this, so you may need a udev rule to re-apply your custom map.

Xorg/Keyboard configuration - ArchWiki
udev - ArchWiki


You could instead dump the current config using xkbcomp $DISPLAY ~/.xkbmap, edit that and then reapply using xkbcomp ~/.xkbmap $DISPLAY. Also temporary, and also needs a udev rule for external keyboards.

Xorg/Keyboard configuration - ArchWiki


xmodmap works but is deprecated, and can’t do as much, though it should be fine for this. It’s definitely the best documented way/path of least resistance.

I haven’t used it much but AFAIK it would also need a udev rule for an external keyboard. However it may be automatically applied at login with some login managers (if you use a certain filename), with others it would need to be configured I think.