With macOS fully supporting unicode throughout the system (including the terminal), extended keyboard layouts (like “U.S. International - PC”) go a long way for easily typing unicode symbols. However, I find the existing layouts to have many shortcomings for my needs, which involve typing German and using a lot of scientific/Greek symbols. Some simple unicode math can come in very handy for IM/emails, and it also makes it much easier to work with unicode identifiers in Jupyter notebooks (especially when editing them in vim).
Using Ukelele, I created a keyboard layout “U.S. International - Scientific” for my use case. The default keys are the standard US layout; unicode symbols are accessed through the right-alt (“option”) key ⌥:
The combination with shift (
⌥⇧) gives the “upper case”:
“Dead-keys” are orange in the above diagrams. These wait for another key to be pressed before returning anything. The layout provides the following features:
Easy umlauts (e.g.
⌥Ofor Ö) and
⌥sfor ß – I’m German.
Support for other Western European languages (e.g. French, Spanish)
- Accent aigu (é) through dead-key
- Accent grave (è) through dead-key
- Accent circonflexe (â) through dead-key
- Tilde accent (ã) through
- Strikethrough letter (ø) through
⌥/dead key (type
o). This works only for a small handful of letters.
- typographic quotes for English (“”, ‘’), French («»), and German („”, ‚’)
- Spanish punctuation marks (¡¿)
- Accent aigu (é) through dead-key
Lots of useful typographic (©, ¶, §, …) and scientific (𝟙, Å, ∞, ×, ⊗, …) symbols.
⌥⇧-produce an en-dash and em-dash, respectively.
- ∑ and ∏ are symbols for sum and product respectively (not upper case sigma and pi, see below).
Support for overbar (a̅) through combining macron diacritical mark (type
⌥5). Useful for indicating e.g. a complex conjugate.
Support for hat (Ô) through combining circumflex diacritical mark (type
.). Note that this is a different unicode character from the Ô that is obtained directly through
O. The combining diacritical mark can be used in combination with any letter, while there are only a fixed number of direct accented characters. I use the combining circumflex diacritical mark only for hats in math notation.
Support for sub-scripts and superscripts through the dead-keys
⌥Z, respectively. E.g., type
0for ₀ and
0for ⁰. Only digits, parentheses, and a small number of letters are available as sub-/super-scripts.
Full Greek alphabet through dead-key
⌥f. E.g. type
xfor χ; or
Wfor Ω. There’s no special mnemonic for
⌥f– it’s just easy to type. The full layout looks like this:
with equivalent upper case. Note that e.g. upper case alpha (Α) is not the same unicode letter as (Latin) upper case A. Some of the more frequently used Greek letters are also available directly, e.g. π as
Full double-strike math alphabet (ℂ) through dead-key
C). This works for all digits, lower case and upper case letters (even though most of these probably aren’t very useful).
You can install the keyboard layout by downloading
and placing the resulting
bundle file either in
(system-wide installation) or
~/Library/Keyboard Layouts (user installation).
You can also open the bundle in Ukelele and use the “Install” option from
the “File” menu (and of course adapt the layout for your needs).
After installation, the layout should be available in the Keyboard System Preferences, in “Input Sources”, as “U.S. International - Scientific”.
Bonus tip: for figuring out what exactly a given unicode character is in the
keyboard layout, type it out in Vim with the characterize vim plugin
installed, put the cursor on top of it, and us the