1

My "A" key is broken, so I want to remap Caps Lock to "A".

This is an unusual remapping, so none of the built-in setxkbmap options (like caps:escape) covers it. I'm also on Wayland so I can't use xmodmap.

Instead, I tried to directly edit /usr/share/X11/xkb/symbols/pc, replacing

key <CAPS> {        [ Caps_Lock             ]       };

with

key <CAPS> {        [ A                     ]       };

This almost works. The problem is that when I press Caps Lock, it sends not one but two "A" key presses.

How can I fix this? Note that this is not a Wayland bug; the same thing happens under X.

  • My blind guess would be that you get one on keydown and one on keyup? From lines I found in /usr/share/X11/xkb/symbols/capslock about making Capslock a Ctrl key, there's also an actions attribute to set. Maybe finding out what that can be set to will prove helpful? – Ulrich Schwarz May 1 '17 at 5:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.