Skip to content

Mac keyboard layouts

I’ve bitten the bullet and bought a Mac (Macbook Pro, a shiny shiny piece of shininess). The most annoying thing about setting it up as a workhorse was the keyboard layout: Mac standards for accessing characters with diacritics like éïòû are (with a few exceptions) pretty nuts. Here’s my solution (including a layout file for you to download), which I hope may be useful for others. (Please note: I’m trying for something that works comfortably for the languages I use myself. If your needs are different you’ll be able to apply the technique I describe here, but you may have to do more of the work yourself, if my layout doesn’t work for you.)

These characters are accessible from the US International keyboard layout, but it’s pretty clear this was designed by someone who doesn’t use a wide range of them. To type é you type Alt-e then e: not too weird, I suppose? But to type í you type Alt-e then i: why the hell should I have to touch e when I’m typing í?!

The Mac strategy is to put the prefix combination that says “put an acute accent on the next key I type” on the letter they think you’ll put acute accents on the most often: the three I remember are éîü and I don’t remember where you find the grave. This is only mnemonic-by-proxy, and even that only if you use the accents according to their expectations. (Dutch is more likely to place the diaeresis on an e, for instance, than a u.)

I much prefer the strategy I’m used to from Linux: the prefix key for an accent looks like that accent, so to get é you type Alt-’ then e, ü is Alt-” then u, and so on. (This does run into difficulties in some cases; for example it’s not clear what punctuation character to use for the háček ˇ, and if you need to use both the diaeresis ¨ and double acutes ˝ you’ll have to make some rearrangements. For the languages and accents I need it’s good enough though.)

I didn’t find any internal option or keyboard layout that works similarly, but there’s a great utility for making simple modifications to OS X keyboard layout files using a graphical interface: Ukelele. It’s also a nice way to see what your current layout provides: hold Alt and you’ll see the modified versions of the keys in the graphical layout, which if nothing else shows the creativity that went into the placement of symbols such as ¶ and √ (Alt-7 and Alt-v respectively) as well as the eventual despair that places ∫ on Alt-b and ª on Alt-9. Here you see the interface while I was pressing Command-Shift-4 for the screenshot:

Ukelele in action

In Ukelele terminology, we want to create a new “deadkey” on (for instance) Alt-’ then assign it to the “state” that produces letters with the acute accent — which already exists in the layout US International. This is what made this process so quick and easy: the groups áéíóú, äëïöü, and so on, are already in the layout, so all we’re doing is making them accessible under a new prefix. (The first thing I did was went through the existing states and gave them more descriptive names than “s1” and “s2”.)

Here’s the resulting keyboard layout file. Save it as a file with extension .keylayout in /Users/<yourname>/Library/Keyboard Layouts/ (you might need to create the Keyboard Layouts dir, noting the space in the name, and by default Library is hidden). After you log out and log in again, it will be available for selection in the keyboard preferences, under the name “US International Sane”.

2 Comments

  1. S. glaber wrote:

    I prefer to switch to the standard keyboard layout for whichever language I’m writing in; this would presumably be possible on a Mac too. Dead keys slow me down too much. But US-international is great for typing in mostly English with the occasional diacritic.

    Wednesday, December 18, 2013 at 5:40 pm | Permalink
  2. tikitu wrote:

    Turns out I wasn’t very self-aware in writing that post: my real main use case is actually that I have colleagues and friends with names spelled with diacritics. (And it offends me to touch an “e” to type “Sándor”, or a “u” to type “Daniëlle”: that part is still true.)

    Thursday, December 19, 2013 at 10:23 am | Permalink

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*

Comments will be closed on January 17, 2014.