1

Running Raspberry Pi-5 with Wayland (and labwc). Would like to use CAPSLOCK key as a control key. The suggested techniques below do not appear to work. They are all pretty old. Is there a way that works with my OS / config? Thanks!

Tried answers found in this question.

Tried updating /etc/default/keyboard and running dpkg-reconfigure. No effect.

Tried 'setxkbmap -option caps:ctrl_modifier'. Got 'WARNING: Running setxkbmap against an XWayland server'. (Also tried 'caps:nocaps' - same warning; did not change CAPSLOCK behaviour.)

Tried 'xmodmap my_fix' where file my_fix is:
  remove lock = Caps_Lock
  add lock = Control_L
Got
X Error of failed request: BadValue (integer parameter out of range for operation)
  Major opcode: 118 X_SetModifierMapping
  ... snip...

Tried to use the Keyboard Layout Handler' in Panel Settings - but no idea how to get to that. It says to start by right-clicking on 'panel' - but there is no 'panel', only the task bar at the top of the screen. And in any case, it says to use setxkbmap - which I tried 'manually'.

Art Swri
  • 111
  • 4

2 Answers2

1

This was working ok for a while, by simply adding XKB_DEFAULT_OPTIONS=ctrl:swapcaps (or any of the variants you tried) to /etc/xdg/labwc/environment, but since an update a few weeks ago, it stopped working.

Clearly a regression, but not sure if anybody has reported it yet.

This is a PITA, especially for us ctrl freaks. (Sorry, I had to do that ;-P).

1

As of Feb, 2025, this answer answers your question: https://raspberrypi.stackexchange.com/a/150737/179732 TL;DR: put XKB_DEFAULT_OPTIONS in ~/.config/labwc/environment