Swapping CapsLock and Ctrl on Mint | Generated by AI

Home 2026.05

Review: CapsLock ↔ Ctrl Swap on Linux Mint

What We Did

~/.Xmodmap — tells X11 how to remap the keys:

  1. Remove CapsLock from the “Lock” modifier group
  2. Remove Ctrl_L from the “Control” modifier group
  3. Reassign the physical CapsLock key → Control_L keycode
  4. Reassign the physical Ctrl_L key → Caps_Lock keycode
  5. Re-add both to their respective modifier groups

This is a clean full swap — both keys work as the other in every app.

~/.config/autostart/xmodmap.desktop — a Cinnamon autostart entry that runs xmodmap ~/.Xmodmap every time the desktop session starts. No root needed; Cinnamon processes ~/.config/autostart/ automatically on login.

DISPLAY=:0 xmodmap ~/.Xmodmap — applied it live to the running X session without needing a logout.


What’s Good

What’s Slightly Fragile


Back Donate