You are not logged in.

#1 2024-07-16 06:00:09

Salkay
Member
Registered: 2014-05-22
Posts: 650

Multiple keyboard layouts in KDE/Wayland

I have a laptop with a "normal" keyboard layout. I normally swap caps and control. I also have an external keyboard that I use half the time. This is an ergonomic keyboard, with the control in a sensible place. Hence, I don't want anything swapped when using the external keyboard.

With X11, I used /etc/X11/xorg.conf.d to provide keyboard-specific layouts. e.g. the external keyboard had

  Option "XKbOptions" "lv3:ralt_switch_multikey,numpad:pc"

whereas internal keyboard had

  Option "XKbOptions" "lv3:ralt_switch_multikey,numpad:pc,ctrl:swapcaps"

Is there a way to do this under Wayland? I can't see a way via KDE's settings.

Alternatively, I might be able to use a udev rule when the external keyboard is plugged in, although this is slightly imperfect as the internal keyboard would then be "wrong" (although I'm unlikely to type on both at once), and I'm also not even sure if you can switch layouts easily with a command (possibly the single key could be swapped). Is there a better and/or simpler way to have different keyboard layouts for different keyboards under KDE/Wayland?

Offline

Board footer

Powered by FluxBB