Mimsy Were the Borogoves

Hacks: Articles about programming in Python, Perl, PHP, and whatever else I happen to feel like hacking at.

Navigating long menus with the keyboard

Jerry Stratton, December 22, 2005

Silver Service submenu

SilverService lets you add any service you can program and use it in any application that supports services.

The services menu in Mac OS X is extremely useful. But it fills up pretty quickly because it gets added to by any service-providing application in your Applications directory. Further, using a tool such as SilverService you can add your own services. I have services for changing case, renumbering lines, numbering lines, sorting lines, sorting words, and converting Unix-style timestamps to an English date, among many others. All of these items are under submenus of a submenu.

Menus aren’t supposed to get this big. It makes navigating with a mouse difficult. But on Mac OS X, you can also navigate with the keyboard. At any point while looking at a menu, you can let go of the mouse and start typing.

The left and right arrow move from one menu to the next. If you have a menu item selected that leads to a submenu, the right arrow or the return key will open that submenu, and the left arrow will close that submenu.

You can type the first few characters of a menu item, just as you can do in any other list on Mac OS X, and the selection will move to that menu item. While I’m typing this article, for example, if I want to use a service I can highlight the text I want to change, click on the Safari menu, type “S” to get to the Services submenu, the right arrow, “Si” to get to the SilverService submenu, the right arrow, and then the first few characters of whatever service I want to use.

At any point you can switch back to using the mouse as well. The Escape key will also close all menus.

You don’t even need to use the mouse to get into the menus. If you know you’re going to want to use the keyboard, you can also use Control-F2 to move into the menus. You can change this shortcut in the Keyboard system preferences.

This feature is useful with any long menu, including the contextual menu’s “Open With...” submenu. If you have a lot of applications on your computer, that one can get pretty hairy, too. But if you know the name of the application you want, just type the first few characters of its name and you’ll be instantly transported to its location in the list.

  1. <- JavaScript Tutorial
  2. iTunes Sleeper ->