is now part of CreativePro.com!

How to Type Special Characters Quickly

8

Wouldn’t it be cool if you could just type “–” and have InDesign automatically replace that with an em dash (—)? Or if you could type copyright and have it automatically expand to © copyright 2019 Ronco Corporation? Or type rbm and have it automatically expand to Ronco® Bass-O-Matic™?

The possibilities are endless. But you’re thinking “Duh! InDesign’s autocorrect feature does that.” Well, yes… but not really. Autocorrect won’t allow any special characters such as en dashes, em dashes, or trademarks in the autocorrect text. But I’ve discovered a sneaky way to include these characters. Here’s how.

  1. In InDesign, choose Preferences > Autocorrect, click the Add button, and add one “placeholder” autocorrection, such as z replaced by zz. You’ll erase this later, so it doesn’t matter that it’s something trivial like this.
  2. Next, you need to determine the numeric “unicode” values for the special characters you want to use. Don’t be scared off by this. You just need to write down a few numbers. The easiest way to do this is to enter a character in InDesign, select the character, and view the value in InDesign’s Info panel (Window > Info). Write down the value (everything after and including the x).The Info panel shows that the unicode value for this character is xAE. Here are a few values to get you started:
    Single opening (left) quote x2018
    Single closing (right) quote x2019
    Double opening (left) quote x201C
    Double closing (right) quote x201D
    Registered trademark ® xAE
    Trademark x2122
    En dash x2013
    Em dash x2014
    Bullet x2022
    Copyright © xA9
    Micro ? x3BC
    Plus or minus ± xB1
  3. Open the Scripts panel (Window > Utilities > Scripts), right-click on the User folder, and choose Reveal in Finder (Mac) or Reveal in Explorer (Windows).

    This will display a “Scripts Panel” folder on your screen. The parent folder of that folder is named “Scripts”. On the same level as the “Scripts” folder, you’ll see a folder named Autocorrect. In this folder you’ll find a file named “English USA.xml”, or similar.
  4. Open the “English USA.xml” file in any text editor. Text editors such as BBEdit, Visual Studio Code, or Oxygen XML Editor are helpful because they will color code things on the screen making it easier to avoid typing errors. But any text editor will do, even Microsoft Word.
  5. Scroll to the very bottom of the text file, and delete the line <wordpair misspelled=”z” corrected=”zz” />.
  6. Now, type your new “wordpairs” as shown below. Be careful — the syntax must be exact. As you can see, each numeric value that you wrote down in step two must be preceded by an ampersand and a pound sign, and followed by a semicolon.Note: If you need to enter a “<” or “>” character in the XML file, you’ll need to enter “&lt;” or “&gt;” instead, since these are special characters in the XML world. For example, to replace “<–” with a left pointing arrow symbol, you would type:
  7. Once you’re sure everything is correct, save the xml file as a “text only” or “plain text” file, and then close the file.
  8. Quit InDesign and then start it back up again.
  9. Choose Preferences > Autocorrect, and click “Enable Autocorrect” twice to toggle Autocorrect off and then back on. After you’ve done so, the “word pairs” that you entered should be visible in the word list in the Autocorrect dialog box (in alphabetical order).
  10. Then, open a file and try it out! If things don’t work as expected, go back to the XML file and examine it closely. Any missing or extra characters can cause the whole Autocorrect feature to stop working. If it gets too messed up you can always throw the xml file away and start over again from step 1.
Keith Gilbert is a design consultant, developer, educator, speaker, and author. His work has taken him throughout North America, Africa, Europe, and Asia. During his 35+ year career his clients have included Adobe, Apple, Target, Oracle, and the United Nations. He is the author of several popular titles for LinkedIn Learning, Adobe Press, and CreativePro. Find him at gilbertconsulting.com and on Twitter @gilbertconsult
  • David Blatner says:

    So wonderfully geeky that it brought the house down… y’all should have heard the applause in the room!

  • I solved this problem with the wonderful Keyboard Maestro application, but this solution is cross platform and uses XML!

  • Could get this to work with the trademark symbol as per Keith’s article, but thought I’d push the boundaries and try it with Emoji characters such as drool (0x1F924) or thinking (0x1F914) but no luck I’m afraid.

    Was hoping that I could use this in combination with a paragraph style that had a GREP style that would apply the apple emoji font to the following GREP code to look for any unicode character – \p{So} but couldn’t get past the autocorrect bit… so looks like Keith’s technique will work for things like copyright symbol, registered trademark… but converting emoticons into emojis – not yet at least.

    • Theunis De Jong says:

      Colin, did you enter that as a single large hex value? Deep (very deep) inside, InDesign works with 16-byte wide character codes. You can sometimes see this if you copy an emoji (or some other “large” character, such as a Chinese character or one of the more outlandish Cambria Math symbols) and move the text cursor over it. It seems to stutter – internally, the single character on-screen is composed of *two* 16-byte values.

      Try the UTF-16 represenation of your drooling: 0xD83E 0xDD24.

      • Thank you for the suggestion Theunis, I did try using the UTF-16 representation that you suggested in your post but no luck I’m afraid. I feel I’m either doing something incorrectly, or that part of the preferences dialog box “freaks out” when attempting to interpret the many iterations of the code that I’ve tried so far… either that or the font for the interface can’t interpret the code.

  • Ulrich Dirr says:

    I had no luck either. I’ve tried this:

    The first should replace three dots with a ellipsis and the following with special chess glyphs. Strangely sometimes the ellipsis did get replaced but most of the time not.

  • >