⌨️ Map CAPS_Lock to Control

Quickly map CAPS_LOCK to CONTROL

Here is a script to map CAPS_LOCK to CONTROL:

#!/bin/sh

# Remap the CapsLock key to a Control key for
# the X Window system.
if type setxkbmap >/dev/null 2>&1; then
  setxkbmap -layout us -option ctrl:nocaps 2>/dev/null
fi

# Remap the CapsLock key to a Control key for the console.
(dumpkeys | grep keymaps; echo "keycode 58 = Control") | loadkeys