Skip to content

Instantly share code, notes, and snippets.

@zgulde
Created December 1, 2017 15:56
Show Gist options
  • Save zgulde/96c4b7a0312ea4ac30bf66493e890fdb to your computer and use it in GitHub Desktop.
Save zgulde/96c4b7a0312ea4ac30bf66493e890fdb to your computer and use it in GitHub Desktop.

MacOS Keyboard Shortcuts

These work (almost) universally in every application in MacOS, the only exception is text editors, which usually prefer their own key bindings.

Interestingly, these are all the same shortcuts you can use in the terminal (through readline), and are the standard key bindings for emacs.

  • Ctrl + a: go to the beginning of the line
  • Ctrl + e: go to the end of the line
  • Ctrl + n: down (same as down arrow)
  • Ctrl + p: up (same as up arrow)
  • Ctrl + k: delete from the cursor to the end of the line
  • Ctrl + f: move forward one character (like the right arrow)
  • Ctrl + b: move backwords one character (like the left arrow)
  • Ctrl + d: delete character after the cursor (like fn + backspace)
  • Ctrl + h: backspace
  • Ctrl + t: swap the places of the two characters behind the cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment