I tried several things:setxkbmap -option caps: returnsetxkbmap -option caps: enterI also tried to modify the file /usr/share/X11/xkb/symbols/pc by:Key <CAPS> {[Enter]};But nothing worked.
How remap my CapsLock key to work as if it was a Return key using setxkbmap?
x11;keyboard shortcuts;keyboard layout;xkb
Not sure if it helps (as not purely in setxkbmap), but:setxkbmap -option caps:nonexmodmap -e keycode 66 = LinefeedChange back:setxkbmap -optionxmodmap -e keycode 66 = Caps_LockYou can check with something like:xev | sed -ne '/^KeyPress/,/^$/p'to get keycodes.