On Tue, Nov 21, 2023 at 11:47:56PM -0800, Alfred Morgan wrote: > 3) my resulting /etc/wsconsctl.conf looks like: > -f /dev/wskbd0 keyboard.map+="keysym Caps_Lock = Control_L" > -f /dev/wskbd1 keyboard.map+="keysym Caps_Lock = Control_L" > -f /dev/wskbd2 keyboard.map+="keysym Caps_Lock = Control_L" > -f /dev/wskbd3 keyboard.map+="keysym Caps_Lock = Control_L" > -f /dev/wskbd4 keyboard.map+="keysym Caps_Lock = Control_L" > -f /dev/wskbd5 keyboard.map+="keysym Caps_Lock = Control_L" > -f /dev/wskbd6 keyboard.map+="keysym Caps_Lock = Control_L" > -f /dev/wskbd7 keyboard.map+="keysym Caps_Lock = Control_L" > -f /dev/wskbd8 keyboard.map+="keysym Caps_Lock = Control_L" > -f /dev/wskbd9 keyboard.map+="keysym Caps_Lock = Control_L" > > not pretty and throws a block of errors on boot but gets the job done. I > guess not a big issue. > > 4) hot plugging in a keyboard after boot doesn't get any of the mapping I > configured.
If the problem is just that you want to swap caps lock and control, rather than be able to make any arbitrary changes to the keyboard mapping after boot, then you can likely solve the problem simply by using one of the built-in mappings which already includes this change: # kbd -l | grep swap us.swapctrlcaps uk.swapctrlcaps jp.swapctrlcaps fr.swapctrlcaps fr.swapctrlcaps.dvorak be.swapctrlcaps us.swapctrlcaps.dvorak us.swapctrlcaps.colemak us.swapctrlcaps.iopener Just put the desired one in /etc/kbdtype and it should just work.