Tuesday, September 30, 2008

Macs and Romanian keyboards

As I found out the other night, the effects of beer on laptops are not nearly as positive as on researchers.

Having to get a new laptop, I decided to bring a Mac "into the family." Everything seems great so far --- it didn't take more than a day to figure out the basics and install several Gb of software essentials (starting with MacTex and Aqumacs Emacs, on to Unison, and recovering all my files from the MIT servers).

Of course, the transition is helped by my insistence on pretending that my Windows was actually Unix (via Cygwin). It feels good to return to a true Unix (after 6 years or so) and stop the pretending. The Mac's superiority seems undeniable (it is Unix, and therefore strictly better than Windows, and it has a wonderful graphical interface, significantly better than X).

Keyboard layouts. The one thing that MacOS did lack was an ergonomic Romanian keyboard layout. As I mentioned before, I find the standard Romanian keyboard horrible, since it banishes some of the most useful Romanian characters (ășțîâ) to the end of keyboard, where they replace other useful characters ([, ], :, etc). The solution is to put the useful Romanian keys on the Latin letters that are not normally used in Romanian (q->ă, w->ș, x->â, k->î, y->ț). To get the original Latin key, press Alt+key. The mapping may seem ad hoc at first, but my experience is that you learn in within minutes, because ț is right next to t, ă right next to a, ș right next to s, and î right next to i. The credit for the original idea goes to ErgoRomanian, a keyboard layout for Windows.

Download. To get what I wanted, I hacked the standard US layout on the Mac. Here is the resulting Romanian Ergo keyboard layout. For the Romanian flag in the menu bar, also download this icon.


  1. Download the files and move them to ~/Library/Keyboard Layouts/
  2. Log out and back in
  3. Go to System Preferences > International > Input Menu. Look for Romanian Ergonomic, and check it.
  4. [optional] Click on Keyboard Shortcuts, disable the Spotlight check buttons, and enable the Input Methods ones. This allows you to switch keyboard layouts by pressing Command-Space.
Alternative spelling. Admittedly, the one slightly annoying feature of this layout is the x->â replacement, since x does sometimes get used in Romanian. But if you did not adopt the spelling recommendations of the Romanian Academy (i.e., if you spell pîine instead of pâine), you shouldn't have a problem, since â is a very uncommon letter for you. I made an alternative Ergo-X layout, in which x remains the default, and Alt-x gives you â.

Download: the Romanian Ergo-X keyboard layout, and its icon. Follow the same instructions as above.

As always, please report any bugs or suggestions.


jelani said...

Of course, the transition is helped by my insistence on pretending that my Windows was actually Unix (via Cygwin).

Why did you work in Windows? If there's a Windows program you use (like powerpoint), you can keep a bare Windows installation in VirtualBox (or vmware) while working in the OS you really want to use.

MiP said...

Why did you work in Windows?

When I switched from Linux to Windows, Linux had really bad support for laptops, and X was also kind of bad. Both of these are better now, though not at the level of Macs.

Also, switching to Macs was not an option at the time, due to the prohibitive cost.

Vivi said...

Thanks for posting this Mihai, the default romanian layout was indeed annoyingly not ergonomic. The issue I am seeing now with the layout you shared is the CMD-W (close a window) combination which doesn't work anymore.

I wonder if we could improve that in any way.

Anonymous said...

You should have waited a couple of weeks. The new macbooks are coming out today.