How remap my CapsLock key to work as if it was a Return key using setxkbmap?
Not sure if it helps (as not purely in setxkbmap
), but:
setxkbmap -option caps:none
xmodmap -e "keycode 66 = Linefeed"
Change back:
setxkbmap -option
xmodmap -e "keycode 66 = Caps_Lock"
You can check with something like:
xev | sed -ne '/^KeyPress/,/^$/p'
to get keycodes.