Super CapsLock On Ubuntu 16.10

On ubuntu 16.10, make CapsLock act as Esc when it is hit, and as Ctrl when it is held.

To make it work, modify /etc/default/keyboard, change

1
XKBOPTIONS=""

to

1
XKBOPTIONS="caps:ctrl_modifier"

Then add the following line in ~/.xsessionrc

1
2
3
#!/usr/bin/env zsh

/usr/bin/xcape -e 'Caps_Lock=Escape'

Reboot.

Share