Swapping Ctrl CapsLock on Bluetooth Keyboard

asked 2018-03-16 09:37:56 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2018-03-16 09:37:56 +0200

fractallyte gravatar image

A little tip for anyone who needs to swap the Ctrl and CapsLock keys on their bluetooth keyboard (Emacs users?):

From the terminal:

cd /usr/share/X11/xkb/keycodes/
nano evdev

change <CAPS> to 37
change <LCTL> to 66

Save, exit, and reboot.

Note: in Linux, the standard way to set your layout and variant, and any other options, is to use setxkbmap:

setxkbmap -layout us -variant dvorak -option "ctrl:swapcaps"

The equivalent in Sailfish is:

dconf write /desktop/lipstick-jolla-home/layout '"us"'
dconf write /desktop/lipstick-jolla-home/variant '"dvorak"'

However, the option setting doesn't work for me:

dconf write /desktop/lipstick-jolla-home/option '"ctrl:swapcaps"'

Hence having to edit the evdev file above...

edit retag flag offensive close delete