In previous articles on writing for the web I’ve talked about workflow for body copy, emphasizing the use of Microsoft Word (or any other intelligent word processor) for both basic proofing and the automatic creation of “smart” typography in text: the generation of curly quotes and apostrophes, em and en dashes, etc.
While this would continue to be my suggested best practice, there are times when you will only need to insert a small amount of text into a web page – correcting a paragraph in an editing tool, for example, or making a few content changes in a CMS – during which using a word processor is unrealistic. If you still want to retain rich typography in what you type, what’s the solution?
Character | Description | Keyboard Shortcut |
---|---|---|
… | (ellipsis) | Option + ; |
– | (em dash) | Option + Shift + - |
‘ | (curly left single quote) | Option + ] |
’ | (curly right single quote) | Option + Shift + ] |
“ | (curly left double quote) | Option + [ |
” | (curly right double quote) | Option + Shift + [ |
On the Mac side, the answer is easy: use keyboard shortcuts. A few of the most common, and useful, are shown in the first table; more shortcuts are available at quotesandaccents.com
As you can see, there are some odd keyboard inconsistencies for single and double smart quotes. Rather than sticking with the default (and often typing the wrong character by mistake as a result), I prefer to remap the keyboard bindings, using a tiny file first suggested by Don Reese:
Place the following text, saved as DefaultKeyBinding.dict, in /Users/<name>/Library/KeyBindings/ on your Mac:
{
"~[" = ("insertText:", "‘");
"~]" = ("insertText:", "’");
"~{" = ("insertText:", "“");
"~}" = ("insertText:", "”");
}
You will need to quit and restart any applications before using the new mappings, which now become:
Character | Keyboard Shortcut |
---|---|
‘ | Option + [ |
’ | Option + ] |
“ | Option + Shift + [ |
” | Option + Shift + ] |
Mac OS X 10.7+
Mac OS X 10.7+ hides the Library folder by default. To make it visible, start up the Terminal and enter this line:
chflags nohidden ~/Library/
You may also need to create the KeyBindings folder inside the Library folder.
Enjoy this piece? I invite you to follow me at twitter.com/dudleystorey to learn more.