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

The monster Mini : A study of rejuvenation through surgery

Mac mini.

The Mini is about the size of a stack of CD cases.

As a proud owner of a Mac Mini of 2007 vintage I’ve over the years grown accustomed to its elegance, quietness, stability and diminutive dimensions. It still handles causal web browsing and media center duties with Plex with grace, but heavier work e.g. Grails development in Jetbrains’ notoriously memory hungry integrated development environment IntelliJ IDEA is pushing it far out of its (and mine) comfort zone. The Mini’s specs – 1.83GHz Core Duo/1GB RAM/80GB 2.5″4200RPM HDD – are simply not up to the task.

Originally I was thinking about getting a new PC and relegating the Mini to media center duties only. But I had a hard time parting from the sympathetic little companion on my desk. Finally I went for a radical upgrade instead. The shopping list:

The SSD pushed the total up to a neighborhood where I could have gotten a pretty decent PC with a fast magnetic hard drive instead, but I was betting on the solid state drive to give my Mini a competitive edge – especially for I/O heavy work loads such as compilation.

The surgery

My Mini in gutted state with no secondary or primary memory installed.

My Mini in gutted state with no secondary or primary memory installed.

A Mini is a bit challenging to upgrade compared to larger PC desktops – which shouldn’t come as a surprise considering its form factor. There is no way to “open” the case as with your run-off-the-mill PC desktop. In fact the case is one solid piece of aluminum. There are plenty of guides (such as this one) on how to pry off the Mini’s aluminum casing from its contents. I’d suggest the presumptive Mac Mini upgrader to carefully study some of these, and watch a Youtube video or two on the same subject, mainly to gather moral strength before brutally gutting the poor Mini with the help of a so-called putty knife.

Don’t feel too intimidated though – I’m no expert on hardware hacking, but found it surprisingly easy to get to the innards of the Mini! When inside the only problem I had was related to the seating of the two new RAM modules – remember to boot up the Mini and check that everything is okay before putting the case back on again!

The outcome

The upgrade has breathed new life into the Mini. Intellij IDEA 8.1.3 is fully usable, perhaps not enjoyable – but that I’m willing to attribute to my general Eclipse preference rather than lack of computer horse power. Web browsing feels snappy, applications that I used to have to wait for now starts up virtually instantly. Overall I’m very satisfied with the upgrade! 🙂