July 25, 2008

Entering Unicode Text and Symbols

If you want to make entering Unicode text a natural part of your workflow on your Mac, whether it be Greek, Hebrew, or special symbols, it is best if you spend a couple minutes preparing your setup. You need to make the "International" preference pane and the Input Menu your friend. In OS X 10.5, you will find the "Input Menu" tab in the "International" system preference pane. Make sure you do six things in this pane:

  1. Check "Show input menu in menu bar"
  2. Check "Character Palette"
  3. Check "Keyboard Viewer"
  4. Scroll down and also enable only the few languages that you'll be using, such as "Hebrew - QWERTY" or "Greek Polytonic" or another Unicode keyboard you have installed.
  5. Also check the "Unicode Hex Input" keyboard.
  6. Finally, either simply note or even customize the two keyboard shortcuts listed that enable you to both toggle between the two most recent input keyboards and to cycle through all unicode keyboards listed in your input menu. For more information on customizing your shortcuts, have a look at this post on Juggling Keyboard Shortcuts.
All this preparation will put the Input Menu in your menu bar that will look something like this:

So, if I'm writing text where I occasionally need to switch to the Greek keyboard, all I do is select Greek from the menu the first time, and from then on out, I use my quick keyboard shortcut to toggle between the two. However, you have other options.

At any point, you can open the "Keyboard Viewer" to have a look at the keyboard layout you currently have selected. But what about the entering of some random letter or symbol in Unicode?

You can open the "Character Palette" from the input menu and search for the glyph. However, if you do a lot of this, then I'd highly recommend getting the great app Unicode Checker.

Also, if you know the Unicode hex number for the letter or symbol, you can switch to the "Unicode Hex Input" keyboard and then hold down the option (⌥) key while you press the numbers/letters for the character. If you're just typing in your default language otherwise, you can keep this specialized keyboard selected. This functionality will be familiar to Windoze users.
For instance, let's say you want to enter that symbol for option. Perhaps you're familiar with my listing of all keyboard symbols here. Then, since you know that the option symbol is hex #2325, with the "Unicode Hex Input" keyboard selected, you hold down the Option key and press "2325" and out pops the "⌥" symbol.

The final thing I'd add is if there are some special symbols you think you'll be wanting to enter with some frequency, you may want to create a text file or snippet so that you can quickly copy and paste them in. I have a text file called Unicode Dingbats Symbols where I collect all Unicode symbols of interest for quick reference. Or, you might use TextExpander or other text replacement utility to change "+command" into "⌘" and "+option" into "⌥" as you type. Or, like me, you may put some frequently used text like this string "⌘⌥⌃⇥␣⎋⇧⇪⏎⌤⌫⌦⌧⇭⏏⌽⇱⇲⇞⇟↑⇡↓⇣←⇠→⇢" on a shelf in Quicksilver that pastes into your document with a keystroke.

Just a few minutes of prep work will have you typing in Unicode with ease. Find the methods that work for you. (You know what they say about obtaining cat skins.)

6 comments:

Zark said...

Thank you for this helpful tutorial.

A.D. Riddle said...

I use transliteration fonts quite a bit for typing Semitic languages. A friend pointed me to Ukelele (from SIL) which allows you to edit your keyboards very easily. I created my own transliteration keyboard where I can quickly type all of the characters I need (both in English & transliteration) without having to change fonts, keyboards, or anything else.

http://www.sil.org/computing/catalog/show_software.asp?id=94

Will said...

Awesome! Thanks so much for this post. I've been trying to figure out how to do this for a while, and it took my two minutes after reading your blog.

Joshua said...

Ditto on Ukelele.

toby99 said...

my need is different, I'm designing a usb gizmo. I want it to write symbols on customer's Macs in an absolute manner ('it always works"). For example, £ is widely claimed to be option-3: I can send option-3, but Macs localised to French won't see a £.
Any clues, anyone? Windoze does it right with Alt-keycodes, they are absolute.

Joe Weaks said...

Toby99,

I think of a couple things immediately, not knowing your situation precisely.
One is, they could have the Unicode Hex Input keyboard enabled and use it that way... the advantage is that it is a standard instruction.
What is your gizmo using to input the symbols? Applescript? If so, you can simply use the clipboard.
set the clipboard to "£" ...
Or even better, if the text input is always in the same application, you can script it without using the clipboard.
Feel free to email me if you want to brainstorm more.