4

I am using Keyboard Layouts Plugin to switch between two layouts.

I want to remap Caps Lock to underscore _.

First I empty Caps Lock, or otherwise Caps Lock will do both – toggle caps and produce underscore character and then map caps lock to underscore

xmodmap -e "keycode 66 = "
xmodmap -e "keycode 66 = underscore"

Problem? This resets every time I log out or change something in Keyboard Layouts Plugin preferences. I want this to be permanent.

Artur Meinild
  • 31,035

1 Answers1

0

You can use the remapper deamon keyd for this purpose. See this answer for installation, usage and tips.

Assuming you run a US layout, use this config:

[ids]

[main]

capslock = S-minus

This maps CapsLock to Shift-Minus, thus producing _.

Rasmus
  • 8,655