How to remap CAPS LOCK on Wayland

keyboard-layoutwaylandxmodmapxorg

Before Fedora switched to Wayland I used this .Xmodmap file to use my CapsLock Key to reach German Umlauts:

keycode 66 = Mode_switch Multi_key
keycode 20 = minus underscore ssharp
keycode 34 = bracketleft braceleft udiaeresis Udiaeresis
keycode 47 = semicolon colon odiaeresis Odiaeresis
keycode 48 = apostrophe quotedbl adiaeresis Adiaeresis

On Wayland this does not work any more – CapsLock would just work as before.

Is there a way to achieve the same result in Wayland, too?

Best Answer

For gnome you can use

gsettings set org.gnome.desktop.input-sources xkb-options "['caps:ctrl_modifier']"

While the preferred way for X is now

setxkbmap -option caps:ctrl_modifier

instead of xmodmap i believe. See this bugreport

Related Question