Restoring PC keyboard sanity on OS X

Purist Mac-heads thinks that pressing Alt+Shift ⇑+8, Alt+Shift ⇑+9 and Alt+7 to produce {, } and | respectively is just the way of nature. As a Mac OS X user and programmer of C syntax programming languages I beg to differ. Personally I very much prefer the less finger acrobatic Alt+7, Alt+9 and Alt Gr+< routines I’m familiar with from the Windows and Linux world for producing the same characters.

I’d not define myself as a Mac-head, my background is mainly in PC:s and Linux even though a SSD-equipped Mac Mini is my primary at-home-computer. OS/X is elegant, fast and has that so desirable it-just-works quality that even current state of the art Linux distributions seem to not yet fully have achieved. Hooking up a PC-keyboard with a Swedish layout to the Mini just works – as expected. But for the the left curly brace, the right curly brace and the pipe character the just works ends there if your are not willing to submit to the arcane finger acrobatics described above.

The fix

  1. Download Ukulele.
  2. Ukulele is a keyboard layout editor, but for our purposes we do not need to edit anything, just grab the .keylayout file for your locale from the Logitech Keyboard Layouts directory of the Ukele disk image and copy it to ~/Library/Keyboard Layouts
  3. Tick the keyboard layout in the Input Sources tab of the Language & Text pane in System Preferences.
  4. Rejoice – curly brace and pipe character frustrations are now a thing of the past!

N.B. the keys mentioned in this post are those found on a PC keyboard with a Swedish language keyboard layout. The general problem described is likely similar for other Nordic and European keyboard layouts, even though there may be some differences to the character↔key mapping.

Advertisements

One thought on “Restoring PC keyboard sanity on OS X

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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s