I ♥ US keyboards

December 6, 2008

Think about it. If you’re a developer and involved in Open Source projects (or alternatively, if you’re employed by an international organization), most of your natural language communication will be in English and, crucially, everything else will be, well, code or something similar to code (XML, LaTeX, Mathematica, etc.). As it happens, code needs characters such as @, {}, [], \, |, which are easily accessible on a US keyboard but not on localized keyboards because they trade the special characters for umlauts and other language-specific keys.

For instance, on a typical European keyboard, nearly all of those special characters that you need in code have to be typed using the right Alt key (which is called Alt Gr for “alternate graphics”) plus some other key. That not only means you’ll have to leave the home row and resort to finger origami, it also slows you down because you’ll no doubt have to look at the keyboard while typing. (It’s much worse on the Mac because Apple refuses to label the keys with the special character that they’d produce, therefore making people having to guess where things are).

So I ask you, if you’re a developer, what are you going to need more often? Umlauts or those characters that predominate in code? Why make typing the characters you need all the time more difficult than typing the characters you only need occasionally? Don’t worry, I’m not suggesting a radically new keyboard layout. But wouldn’t it make more sense to turn the tables on those umlauts? In other words, what I am suggesting is a hacker-friendly US keyboard, simply enhanced with language-specific characters accessible with Alt Gr.

The German Linux Magazine suggested this several years ago already and showed how to do it for German umlauts on X11. Ever since I’ve been on the Mac, I’ve been using a similar custom keyboard layout (I call it “U.S. German”). It’s a U.S. layout, but it allows me to type umlauts with Option+vowel, ß with Option+s and € with Option+e. I created it with Alex Eulenberg’s excellent keyboard layout generator, starting out with the U.S. layout and blank Option key mappings, and then adding my own mappings like so:

   Oa $00e4  :: auml
  OSa $00c4  :: Auml
   Oo $00f6  :: ouml
  OSo $00d6  :: Ouml
   Ou $00fc  :: uuml
  OSu $00dc  :: Uuml
   Os $00df  :: szlig
   On $00f1  :: ntilde
  OSn $00d1  :: Ntilde
   Oe $20ac  :: euro

After having saved the resulting file properly in OS X’s library path and logging out, I was able to chose the keyboard layout from System Preferences and have used nothing but ever since. Here’s a screenshot of the Keyboard Viewer app when pressing the Option key:


When I originally posted this on my old blog, I got an email from somebody at Aachen University’s Comp. Sci. department who had the same idea, but put a bit more effort in it and produced an even nicer version. So instead of providing my own layout here, I suggest you use the one form their website. Alternatively you could use the generator and come up with your own. I also hear good things about Ukulele, a visual keyboard layout editor. I have no idea about Windows, but I’d be thrilled to hear if people have managed to come up with something for it as well.

Whatever you do, don’t be a slave to your localized keyboard just because you need the occasional umlaut, accent or slashed vowel. There are better ways for us developers. I ♥ US keyboards.

P.S.: One should note that US keyboards are even physically different (the Return key has different proportions and it lacks a key that European keyboards have). Since you couldn’t buy a Mac in Europe with a physical US layout until recently, my laptop has a physical European layout (which sucks). The physical US layout makes much more sense on a Mac since you can jump through applications with Command+Tab and through windows of a particular application with Command+`, which on a physical US layout is right above the Tab key.

8 Responses to “I ♥ US keyboards”

  1. Being Icelandic I’ve dealt with the same problems you describe in the post. Until now I’ve just used the apple-space combination to switch between the U.S. and the Icelandic keyboard layout. This however slows you down, especially when you realize that you have the wrong layout after you’ve written some text and you need to delete and write it again with the correct one.

    I’m going to use your idea to create an U.S. Icelandic layout. Thanks for the idea.

  2. imonsei Says:

    on a danish keyboard this is even worse.
    you have ‘å’ to the right of ‘p’ and ‘æ’ and ‘ø’ to the right of ‘l’.
    they have moved “{[]}” to altGR + “7890”.
    also ‘\’ is altGR + the key next to the left shift.
    then there’s ‘|’ which is next to the backspace.
    and so on and so forth.

    at least i have developed finger dex over the year.

    but it’s POOP! 😛

  3. zagy Says:

    Well, I’m on the normal US layout. The Umlauts are a bit far away (ö for instance is alt-u followed by o). Alt-u are actually just the umlaut dots. Sometimes I’m also using the U.S. Extended for the ocasional Polish characters.

  4. Martin Says:

    …as a nice addition to your “virtual” keyboard layout:
    The REAL customizable keyboard layout:


  5. philikon Says:

    Martin: € 1232… what a bargain!

  6. Martin Says:

    Ah, insufficient haptics 😉

    1200 Euros, well, but that thing is stuffed with OLEDs and you could probably make it show 104 different stamp-sized pr0ns 😀

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: