July 8th, 2009 • 10:14 am
Apple’s Pages application has very limited keyboard shortcut customization abilities. The only shortcuts that you can assign within the application’s user interface are the F1 to F8 keys, and they can only be used for styles:
Fortunately, Pages ’09, like most other well-behaved Mac OS X applications, also supports the system-wide keyboard shortcut customization feature provided through the System Preferences application, in the “Keyboard & Mouse” preference pane:
(If you are wondering why you cannot see the Expand/Collapse triangle next to the “Pages.app” entry in the list, it’s because Mac OS X has had this bug for years where it fails to invert the triangle when a list item is selected. The problem is made more acute by my choice of selection highlighting colour, which is a shade of green darker than the default sky blue. This bug will apparently finally be fixed in Snow Leopard.)
This compatibility with the system-wide keyboard shortcut customization feature means that you can use the system-wide feature to assign a keyboard shortcut to a specific menu command in Pages:
It works reasonably well for most commands, although the system-wide keyboard shortcuts feature in Mac OS X suffers from some limitations, which prevent you from using certain keys or certain key combinations.
It also means that, if a specific command in Pages cannot be accessed through a specific menu command in the Pages menu bar, then it’s impossible to assign a keyboard shortcut to it. For example, the “Keep lines together” and “Keep with following paragraph” formatting options are essential features if you want to maintain a certain level of control over your document’s pagination without resorting to ugly hacks such as the use of manual page breaks:
Unfortunately, the text inspector is the only way to access these options in Pages ’09, so you cannot assign keyboard shortcuts to them, like you can in Microsoft Word.
The keyboard shortcuts for styles feature is the only area in Pages ’09 where you can assign keyboard shortcuts to things that are not accessible via the menu bar (styles, in this case). But of course this feature is also very limiting, since you can only use 8 shortcuts, and these shortcuts have to be the F1 to F8 keys.
What makes the limited keyboard shortcut customization abilities in Pages ’09 even more frustrating, however, is the profound ambiguity regarding the way user-defined keyboard shortcuts are stored and preserved in Mac OS X.
For the F1 to F8 shortcuts used for styles in Pages, there aren’t any problems. These shortcuts are document-specific and are saved with the document itself.
But what about the application-specific keyboard shortcuts defined via the System Preferences application, in the “Keyboard & Mouse” preference pane? Well, it looks like it takes a degree in Mac OS X engineering to figure out where they are stored and how to preserve/protect them.
Apparently, they are stored in the Pages preference file, i.e. com.apple.iwork.pages.plist, in your home library folder. If I open that file in a text editor, here is what I find:
<key>NSUserKeyEquivalents</key> <dict> <key>All Caps</key> <string>@$a</string> <key>Export…</key> <string>@~$e</string> <key>Small Caps</key> <string>@$h</string> <key>Superscript</key> <string>@$=</string> <key>Title</key> <string>@$t</string> </dict>
These are shortcuts that I have just assigned via the “Keyboard & Mouse” preference pane to various menu commands in Pages that I use a lot. (“@” stands for the Command key, “$” for the Shift key and “~” for the Control key.)
But my problem is that I have just had to reassign all these keyboard shortcuts to these commands, even though I have been using them for years. Why? Because, for some reason (probably a system update some time in the recent past), at some point the ability to view and edit the existing application-specific shortcuts in the “Keyboard & Mouse” preference pane was lost.
The shortcuts were still working, but if I went to the “Keyboard & Mouse” preference pane and tried to look under “Pages,” to view the application-specific shortcuts that I had defined, I could no longer see them. There was no entry for “Pages” in the “Keyboard & Mouse” preference pane anymore.
And as soon as I decided to add a new Pages-specific shortcut for some other command through the “Keyboard & Mouse” preference pane, Mac OS X promptly eliminated all the existing shortcuts that, until then, were still working properly in Pages ’09, even though they were no longer visible or editable in the “Keyboard & Mouse” preference pane.
This happened, presumably, because defining a new shortcut via the “Keyboard & Mouse” preference pane caused Mac OS X to wake up and realize that it no longer had any shortcuts listed for Pages commands in the “Keyboard & Mouse” preference pane, and so it started again from scratch.
This is eminently frustating, and it’s not the first time it’s happened to me. It seems that, every time there is a significant system update or I have to reinstall my system for whatever reason, somehow the connection between the shortcuts defined and stored in the com.apple.iwork.pages.plist preference file and the shortcuts listed in the “Keyboard & Mouse” preference pane is lost.
This forces me to keep a list of my user-defined shortcuts for Pages in a separate file, because I regularly have to reassign them in the “Keyboard & Mouse” preference pane. In other words, if you are planning to do any keyboard customization in Pages via the “Keyboard & Mouse” preference pane, make sure you keep a separate list of all the shortcuts you define, because you’ll more than likely have to reassign them again and again over the years, just like me.
A long time ago, I submitted a bug report to Apple about this. I never got a satisfactory reply. The only thing that they ever said to me was:
After reviewing your submission engineering has determined that the behavior you reported is as expected.
If you go that route, you also need to preserve “com.apple.universalaccess.plist”.
(“That route” was referring to a clean install of the OS, which I provided as a step that could be used in order to reproduce the problem. But it’s not a required step. I have had the problem happen to me without a clean install.)
Well, I am sorry, but I have never touched the “com.apple.universalaccess.plist” file in my home folder and Mac OS X has still managed to “misplace” my application-specific keyboard shortcuts again and again over the years. Besides, if I look at the contents of this file, I don’t see anything related to application-specific keyboard shortcuts. (I should note that this feedback from Apple dates back to 2006. It is possible that the architecture used for storing keyboard shortcuts has changed since then. But as far as I can tell, Mac OS X still does not have the ability to properly preserve application-specific shortcuts and keep them viewable/editable in System Preferences over several years and several system updates.)
On a more positive note, I would like to conclude by pointing out a couple of things that have actually improved for keyboard shortcuts in Pages in recent times.
I used to have a user-defined keyboard shortcut (command-shift-P) for inserting a manual page break in Pages, because Pages did not have one built in. I had initially tried to assign a shortcut using the Enter key on the numeric pad, because that’s what the standard keyboard shortcut in Microsoft Word uses, but Mac OS X would always refuse to allow me to define a keyboard shortcut using the Enter key in the “Keyboard & Mouse” preference pane.
In Mac OS X 10.5 (Leopard), however, I now able to use the Enter key as part of a keyboard shortcut in the “Keyboard & Mouse” preference pane. In addition, Pages ’09 itself now comes with a built-in keyboard shortcut for inserting a manual page break, which is… command-Enter, or control-Enter. (Both work fine, as well as shift-command-Enter, etc.) So I actually no longer have any need for a user-defined keyboard shortcut for this particular command.
The capitalization commands (in the “” menu) in Pages used to be another source of frustration:
As you can see in the picture above, it is possible to assign keyboard shortcuts to the commands for “,” “ ,” and so on. These commands are formatting options. In other words, applying “ ” to a string of text does not replace the characters with capitals. It applies “ ” formatting to the string of text, but that can be reversed by selecting the “ ” option.
This behaviour is different from the corresponding feature in Microsoft Word. Word also has an “” formatting option, but the command to activate this option has a “toggle” behaviour, which means that, if you use the command twice in a row, Word applies the formatting, and then removes it. Whereas if you use the “ ” command twice in a row in Pages ’09, the text just stays in all caps. The only way to remove the “ ” formatting in Pages ’09 is to use the “ ” command
This was particularly frustrating in previous versions of Pages and Mac OS X, because it was, in my experience anyway, impossible to assign a keyboard shortcut to the “” command—or at least the keyboard shortcut that I am used to using for this purpose, i.e. command-shift-option-Space.
However, in Pages ’09 under Mac OS X 10.5 (Leopard), I find that I am now able to do just that, i.e. assign the command-shift-option-Space to the “Keyboard & Mouse” preference pane, as can also be seen in the picture above. And it works!” command via the “
It’s still not exactly what I want. In Microsoft Word, I use command-shift-option-Space as the shortcut for the all-purpose “” command, which strips not just All Caps formatting, but all other character-level formatting options from the selection.
As far as I can tell, there is no way to assign this keyboard shortcut to the corresponding command in Pages ’09, because the only way to access this command is to click on the “None” style in the “Character Styles” section of the styles drawer. You can assign a shortcut to that “None” style, but it can only be one of the F1–F8 keys. And I just cannot get used to using a function key for this. Function keys are not as easy to hit as a shortcut such as command-shift-option-Space, because the function keys, especially on Apple’s aluminum keyboard, are smaller and the small text label on them is harder to see. They are OK for occasional use, but not for a command as commonly required as stripping all character-level formatting.
Still, being able to assign the command-shift-option-Space shortcut to the “” command in the “ ” submenu is better than nothing, and is better than what used to be possible in previous versions of Pages and Mac OS X.
So there have been some improvements on the keyboard shortcut customization front. But Pages ’09’s capabilities are still too limited, especially for power users who make heavy use of styles in particular and of keyboard shortcuts in general.