Navigating long menus with the keyboard
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.
- SilverService
- “SilverService is a Mac OS X application that allows you to use familiar unix shell commands from within any Services-aware application (i.e., almost any Cocoa application).” This is a very useful application if you do command-line scripting but also work in the GUI.
More macOS tricks
- 42 Astoundingly Useful Scripts and Automations for the Macintosh
- MacOS uses Perl, Python, AppleScript, and Automator and you can write scripts in all of these. Build a talking alarm. Roll dice. Preflight your social media comments. Play music and create ASCII art. Get your retro on and bring your Macintosh into the world of tomorrow with 42 Astoundingly Useful Scripts and Automations for the Macintosh!
- Save clipboard text to the current folder
- Use the Finder toolbar to save text on the current clipboard directly to a file in the folder that Finder window is displaying.
- Avoiding lockFocus when drawing images in Swift on macOS
- Apple’s recommendation is to avoid lockFocus if you’re not creating images directly for the screen. Here are some examples from my own Swift scripts. You can use this to draw text into an image, and to resize images.
- What app keeps stealing focus?
- I’ve been having a problem on Mac OS X with something stealing focus. Here’s how to at least find out what that something is.
- Enable AirPrint for all connected Mac printers
- I have an iPad and an old workhorse of a printer, an HP 1012 LaserJet, connected to my iMac. I almost never need to print from the iPad, but when I do, handyPrint works.
- 14 more pages with the topic macOS tricks, and other related pages