How do I type the prime and double prime characters on OS X?

Solution 1:

Using the Character Viewer, search for "Prime". You can then click "Add to Favorites" for more convenient access.

enter image description here

In Mavericks, the following shortcut is helpful to bring up the character viewer:

Control + Command + Spacebar

Click the button in the top right corner to switch between the "Characters" window and "Character Viewer". Note: to get that button or the search bar to appear, you'll need to scroll up.

enter image description here

Solution 2:

I don't know if it's the easiest way, but here's one way:

In the "International" system preferences, turn on the keyboard layout called "Unicode Hex Input". When you need to type a prime, type commandspace to switch to this keyboard layout, and then hold down option and type 2 0 3 2. For double prime, it's 2 0 3 3.

Solution 3:

Character Palette


´ (prime): 2032

˝ (double-prime): 2033

(thanks to Paul Berkowitz)

Unicode Hex Input Keyboard


´ (prime): option 2 0 3 2

˝ (double-prime): option 2 0 3 3

(thanks to @Ken's answer)

Solution 4:

Modify the Press & Hold keys

For entering special characters such as the primes, I prefer the Press & Hold method since it's easy to remember and really quick if you shorten the Press & Hold time.

  1. Navigate to System/Library/Input Methods/PressAndHold.app/Contents/Resources/.

  2. Backup the Keyboard-en.plist file.

  3. Append the following to the Keyboard-en.plist file (before the closing </dict></plist>).

    <key>Roman-Accent-t</key>
    <dict>
        <key>Direction</key>
        <string>right</string>
        <key>Keycaps</key>
        <string>t ′ ″ ‴</string>
        <key>Strings</key>
        <string>t ′ ″ ‴</string>
    </dict>
    

Feel free to change the Roman-Accent-t to any character you wish, providing it does not already have Press & Hold keys assigned.