brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: turn Caps Lock into an extra Control key on your Mac

Terminal
~/tips/tip-macos-modifier-keys-caps-lock-control

Caps Lock key: Control

Makes the Caps Lock key work as Control, handy for terminal shortcuts.

Caps Lock is the biggest key on the left side of the keyboard and the one I’d miss least. On old UNIX keyboards Control sat in that spot, which is why Terminal, Emacs and tmux shortcuts lean on Control so much. macOS lets you change what Caps Lock does, without any extra app.

Go to System Settings, click Keyboard, then Keyboard Shortcuts, and choose Modifier Keys in the sidebar. Every modifier key has a pop-up menu: choose a different action for the key, or No Action to switch it off.

System Settings > Keyboard > Keyboard Shortcuts > Modifier Keys
  Caps Lock key: Control

After that, Caps Lock-C in Terminal stops a running command, and Caps Lock-A or Caps Lock-E jump to the start or end of the line in the shell, the same as Control would. I’d say it’s worth a week of getting used to if you spend a lot of time in a terminal.

The caveat: Caps Lock is then gone, so typing in capitals means holding Shift. If it all feels wrong, the Restore Defaults button in the same panel puts every modifier back the way it was.

Further reading: Change the behavior of the modifier keys on Mac

More Terminal tips ioreg -rn AppleSmartBattery | grep CycleCount Terminal can save your windows and tabs as a window group Export a Terminal profile to a .terminal file and import it on another Mac mc hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x700000029}]}' All Terminal tips (116) All topics

Link