Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a bunch of keyboard shortcuts setup for Pages, Keynote, and several other programs. Is there a way to export and then import these shortcuts? I just reformatted my home computer and am now going through the painful process of re-creating all the shortcuts.

Paul Irish's dotfiles got me thinking about this:

share|improve this question
Could you explain why Paul Irish's dotfiles made you think about that or pinpoint the actual code you are referring to? – Gerry Oct 9 '12 at 12:45
up vote 3 down vote accepted

It depends on how you have defined the shortcut keys. The files responsible for storing these preferences are in the usual place: ~/Library/Preferences

You could simply move the files that store the preferences over to the new Mac:


If you were good at parsing JSON or XML, you could do the export to a text file as well using the plutil tool.

share|improve this answer
I've defined the shortcuts via the System Preferences > Keyboard panel. Should/can I do this via a text editor? That'd be better for sure. – saltcod Oct 9 '12 at 13:50
The big thing is that application shortcuts go into the app preference file and system wide ones, the system pref file. You can use PlistBuddy and plutil to systematically convert a text file into property list additions as well as to issue defaults write commands to append them. This is advanced scripting, but doable for a DIY hacker. – bmike Oct 9 '12 at 13:52
Awesome. Thanks, bmike. – saltcod Oct 9 '12 at 13:57

The above answer is too complicated. With Keynote 9 (v 5.3) and Mountain Lion, and assuming that the format bar is visible, you can simply define a key in Keyboard Shortcuts panel of the Keyboard System Preference:

  1. Select "Application Shortcuts", and click the + icon
  2. Select the Keynote application.
  3. For the Menu Title type the font name exactly as it appears in the format bar. I entered "Times New Roman".
  4. Type the shortcut key (I used Option+Command+R).
  5. Quit Keynote and restart it.
  6. Select some text and type the shortcut key. The font will change to Times New Roman.
share|improve this answer

The shortcuts for sandboxed applications are stored in ~/Library/Containers/*/Data/Library/Preferences/*.plist. The shortcuts for all applications are in ~/Library/Preferences/.GlobalPreferences.plist. You could probably just copy the preference files from the old account.

I use a shell script like this to configure the shortcuts in the old-style property list format. You can print the current settings with defaults read.

defaults write -g NSUserKeyEquivalents '{
"Back" = "@\UF702";
"Go Back" = "@\UF702";
"Forward" = "@\UF703";
"Go Forward" = "@\UF703";
"Minimize" = "\0";

defaults write NSUserKeyEquivalents '{
"Show Package Contents" = "@\r";
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.