Changing OS X keyboard shortcuts when app name has changed
This entry describes a somewhat techie solution to an unusual problem that most people are unlikely to have. The main reason I'm writing it up is so that if someone else happens to be searching for it, they can find it. I suppose I ought to put it on Stack Exchange instead of my blog, but oh well.
I just encountered a mysterious situation:
I had set up a keyboard shortcut in the OS X application formerly known as Address Book, probably a couple years and a couple OS versions ago. (Apple: Y U NO INCLUDE BIRTHDAYS ON ADDRESS CARDS BY DEFAULT?)
But that shortcut now conflicts with another one, so I wanted to change it. But the shortcut didn't appear in the Keyboard pane of System Preferences. And when I tried to override it by adding a new shortcut in the Keyboard pane, the new shortcut didn't replace the old one.
After a certain amount of digging, I discovered that it was stored in this file: ~/Library/Preferences/com.apple.AddressBook.plist.
But in the latest version of the OS, the application isn't called Address Book any more; it's called Contacts.
So I opened the plist file in Property List Editor and deleted the old keyboard shortcut.
And now I've added a new Contacts keyboard shortcut in the Keyboard pane and all is well.
The new shortcut, btw, has now been written to com.apple.AddressBook.plist. So I'm guessing that the Contacts application is still using the com.apple.AddressBook.plist preferences file, but that the Keyboard pane got a little confused by the change of application name, and thus couldn't display (or allow me to modify) the old shortcut.
Incidentally, fixing this also led me to discover that in .plist files, keyboard modifiers appear to be stored as characters. For example, @$b
represents Command+Shift+B.
Oh, and while I'm here, I should note that the Key indicating a keyboard shortcut in a .plist file is NSUserKeyEquivalents; finding a mention of that on a web page is what led me to be able to track down and solve the problem.
And now I can more easily add birthdays to my friends' Contacts entries again. It's fairly likely that the amount of time I spent figuring out how to fix this (about half an hour) is greater than the total amount of time I would have spent working around it for the rest of my life.
~Technology: Making our lives easier!~