Wednesday, November 03, 2010 7:55 AM | rahel luethy | 6 comment(s)

Mac Tips & Tricks #2: Keyboard Navigation

Even though I like my slick & shiny magic mouse, I'm a keyboard person when it comes to daily computer life. As expected, a few things are different on the Mac compared to my previously used platforms (Linux & Windows) — here's my selection of the most important settings, tweaks & workarounds:

Full Keyboard Access

Let's assume that a program prompts you with a standard OK/Cancel dialog. On most platforms, such dialogs are navigable by keyboard: The Tab key switches focus between the controls and Enter triggers the selected button. Not on the Mac. For starters, full keyboard access is off by default — turn it on via System Preferences » Keyboard » Keyboard Shortcuts » Full Keyboard Access (All Controls) . In addition, the behavior is slightly different: While the Tab key works like expected, Enter fires the default button (blue) while you need to press Space to invoke the selected button (blue outline).

Terminal Alt Key

While I will probably write a separate post on Terminal issues, the most important tweak for me was the reassignment of the Meta key (Alt key on Windows). In bash, the Meta key is quite crucial: Meta-. (insert last argument) IMHO is the most useful shortcut ever. Unfortunately, Meta is emulated with the Esc key on the Mac, which is really not very ergonomic. You can however reassign it in the Terminal Settings, on the Keyboard tab ("Use option as meta key").

fn Key

The function keys (F1 to F12) are another newbie pitfall. These keys are overloaded on the Mac, F8 e.g. plays your music library in iTunes. If you intend to use them as "raw" function keys (and e.g. use F8 to drive the debugger in Eclipse), you need to hold the special fn key.

Quicksilver

One of my favorite Mac applications so far is Quicksilver, which is best described by its mantra — Act without doing. In essence, it is a smart version of Spotlight. A fully configurable application launcher/controller which is navigable by keyboard. Describing it further wouldn't do justice, so I'm just going to list my 3 favorite use cases and you can read the rest in one of the various online tutorials:

  1. Launching applications via keyboad. Over the last +7 years, I always launched a Terminal via Ctrl-Esc. Quicksilver does the trick on the Mac.
  2. Browsing directories. Quicksilver is also a smarter version of the Finder.
  3. Clipboard history: Maintains a (configurable) number of last clipboard entries, ready to be pasted anywhere.

I overloaded the Spotlight keyboard shortcut Ctrl-Space to trigger Quicksilver (and don't forget to say goodbye to the Dock, Finder & Spotlight before you install it, you will most likely never use them again ;-)).

10:59 AM | Blogger kyb said...

On windows, Launchy (very similar to Quicksilver) is now pretty much the first thing I install.

12:14 PM | Blogger rahel luethy said...

Thanks for the hint -- I will give this a try on my Windows box at home!

4:00 PM | Blogger Unknown said...

Regarding fn key and the F1, F2, etc. keys, this can be configured.

From System Preferences, select Keyboard.

Under the Keyboard tab, there is an option for:
"Use all F1, F2, etc. keys as standard function keys", which then means that you must use the fn key to use the special features.

It just depends on which activity you use more often. Personally, I leave the F1, F2 keys without the fn modifier, because so many apps (especially IDEs) use them.

4:53 PM | Blogger rahel luethy said...

@Tim: Excellent info, thanks! I will change the settings immediately...

1:53 PM | Anonymous Nj said...

I used to find it annoying that if you minimise something with Apple+M then you can't unminimise without clicking on it. That was until I discovered that if you hide it with Apple+H instead then you can just apple tab back to it.

Oh, and thanks for pointing out that you can enable Full Keyboard Access - I never looked for the option but always regretted it wasn't there :)

Finally, space for the selected button and enter for the default button is standard in Windows too, only with the caveat that if the selected control is a button the default button is temporarily removed. You can see it happen as you tab through a dialog with lots of controls like the display settings dialog.

2:47 PM | Blogger rahel luethy said...

Funnily, I never minimize windows. Maybe because I use "Spaces" (aka virtual desktops) a lot? Still a good tip though! Thanks for your clarifications re:Space/Enter key...