The Hidden Keyboard Shortcuts of Mac OS X

INTERSECT helps businesses create and deliver exceptional digital products that marry business objectives and user needs. Learn more.

No matter your job function, you are entering text in various applications all day long, from spreadsheets and emails to web browsers, text editors, and countless others. You move your hand to the mouse, click to position the insertion point, drag to select some text, double click to select a word, triple click to select a line, move your hand back to the keyboard and resume typing.

Yes, mice and trackpads are great for moving the cursor and selecting text, but I’ve often found it more comfortable and efficient to keep both hands on the keyboard.

As a Mac user, you likely know all the common and documented keyboard shortcuts for commands – New, Open, Close, Cut, Copy, Paste – but there are a number of shortcuts many may not be aware of yet.

Simply put, with these shortcuts, you can make your life easier and just keep your hands on the keyboard. I can’t tell you exactly how much more efficient this will make your job function, but it will… by a lot.

Check it out:

  • Control-A: Move to the beginning of the line or paragraph.
  • Control-B: Move one character backward.
  • Control-D: Delete the character to the right of the insertion point.
  • Control-E: Move to the end of a line or paragraph.
  • Control-F: Move one character forward.
  • Control-H: Delete the character to the left of the insertion point.
  • Control-K: Delete the text between the insertion point and the end of the line or paragraph.
  • Control-L: Centre the cursor or selection in the visible area.
  • Control-N: Move down one line.
  • Control-O: Insert a new line after the insertion point.
  • Control-P: Move up one line.
  • Control-T: Swap the character behind the insertion point with the character in front of the insertion point.
  • Control-V: Scroll down.
  • Shift Key: Try holding the Shift key for commands that move the insertion point. You’ll find the Shift key is useful for modifying the selection.

Can I make the Caps Lock button useful?

First thing you may notice with the list of shortcuts above is they all begin with the Ctrl key. Some may find that key difficult to access on a typical keyboard though, tucked away in a corner, outside of general reach.

This is where the Caps Lock key comes into play. If you’re like me, you very rarely use Caps Lock. It’s a big key and takes up valuable keyboard real estate, equal in size to the Return key though used maybe an eighth as much. Thankfully, you can remap it to be a Ctrl key:

  • Select System Preferences from the Apple menu.
  • Click on Keyboard icon.
  • Click on Keyboard tab.
  • Click on Modifier Keys button (bottom right corner).
  • Beside Caps Lock Key choose Control.

Are these shortcuts universal across all applications?

These commands should work across all apps in which you enter text, though there are some rare exceptions when an application doesn’t respect the defaults and overrides commands with their own. In the case when an application doesn’t let you use a new favourite shortcut, you may still be able to modify some shortcuts. In that application, find the offending keybinding and remove it or reassign it to some other shortcut.

Or, if you find that a menu item is assigned to your new favourite shortcut, you can go to System Preferences and rebind that shortcut to something that doesn’t interfere.

  • Select System Preferences from the Apple Menu.
  • Click on Keyboard icon.
  • Click on Shortcuts tab.
  • Select App Shortcuts from the list on the left.
  • Click on + button.
  • Choose your Application from the menu.
  • Enter the title of the conflicting menu item.
  • Choose a shortcut that doesn’t conflict.
  • Click Add.
  • You will need to Quit and reopen your application to see changes.

Can I add my own shortcuts or modify existing ones?

If you want to add or modify shortcuts on your system, you need to access a special file on your computer called `DefaultKeyBinding.dict`.

If it isn’t already on your computer, it’s likely because by default Mac OS X does not install it. But you can create one:

  • From the Finder select Go menu and hold down the Shift key.
  • Choose Library.
  • Locate the Keybindings folder in the Finder window that appears. If you don’t see one, select File > New Folder and rename the folder to Keybindings.
  • Open the Keybindings folder.
  • Using your favourite text editor create a new document. Name it `DefaultKeyBinding.dict` and paste the following text:
    "^m" = "setMark:";
    "^M" = "selectToMark:";

    "^D" = "deleteWordForward:";
    "^s" = "deleteBackward:";
    "^S" = "deleteWordBackward:";

    "^u" = "deleteToBeginningOfLine:";

    // Override default transpose command.
    "^t" = "pageUp:";

    // Override default scroll down with page down instead (scroll down only
    // scrolls while page down moves the insertion point).
    "^v" = "pageDown:";

    // I find Ctrl+j easier to type than Ctrl+b for move left.
    "^j" = "moveLeft:";
    "^J" = "moveLeftAndModifySelection:";

    // Override default with a set of chorded shortcuts. That is,
    // first press Ctrl+l and then press the Ctrl+<key> listed below.
    "^l" =
        "^w" = "selectWord:";
        "^l" = "selectLine:";

        "^a" = "moveToBeginningOfDocument:";
        "^e" = "moveToEndOfDocument:";
  • Save `DefaultKeyBinding.dict` in the Keybindings folder.
  • Try out the new shortcuts in your applications. If your application is open, you will need to quit it first and reopen.

There are my hidden Mac keyboard shortcuts revealed. Enjoy your extra minutes in the day and happy typing.