#!/bin/sh # Remaps Capslock key to control. # (only works for x environment - I haven't needed it for non-x yet) setxkbmap -option ctrl:nocaps # Makes Capslock behave as escape - when ONLY capslock is pressed and released # this only works when we already substitute a ctrl for caps with the lines above, # otherwise control itself will act as escape. # Needs xcape package installed. https://github.com/alols/xcape xcape -e 'Control_L=Escape'