Accessing Menus in Mac OS X via Keyboard

17

8

My question is how to access application menus, like file, edit, view - using the keyboard.

Or how to create a new short cut in any application (for example Xcode).

Example -> I want to create a short cut for following menu option in Xcode

=>Run Menu -> Start With Performance tool -> Leaks

like - Command + shift + Ctrl + R

Is it possible? How?

I have included here two questions

  • How to access menu through keyboard in Mac OS X?
  • How to create a new short cut for any particular option of application?

Sagar R. Kothari

Posted 2009-08-25T20:30:33.503

Reputation: 4 267

Answers

20

  1. Control-Fn-F2, or Control-F2 if you use F1, F2 etc. as standard function keys.

  2. System Preferences » Keyboard and Mouse » Keyboard Shortcuts. Click the + button and follow the instructions.

Benjamin Dobson

Posted 2009-08-25T20:30:33.503

Reputation: 1 021

1You can also change the key sequence for the default Contrl+F2 under "Settings -> Keyboard -> Keyboard Shortcuts -> Keyboard Text & Input" and set a new key sequence for "Move Focus to Menu Bar" option. I like to set Cmd+Space to mimic that of windows (which is by default used for Spotlight search) – haridsv – 2011-04-25T16:59:44.093

1@Benjamin - Sir - I am using MAC OS X - 10.5.7. & The option that you suggested to me isn't working. – Sagar R. Kothari – 2009-08-25T23:43:12.427

@sagar: on MacOS X 10.5.7, the Control-Fn-F2 option works for me; the plain Control-F2 just tries to increase the brightness of my screen. However, that probably means I'm not using the keys as standard function keys. – Jonathan Leffler – 2009-08-26T06:03:38.180

2Full Keyboard Access needs to be turned on for this to work: You can turn it on in the Keyboard Preference Pane. (Or press <kbd>Control</kbd>-<kbd>F7</kbd>) – Chealion – 2009-08-26T07:38:29.207

@Chealion—not for me it doesn't. @sagar—which one? And why aren't you on 10.5.8? – Benjamin Dobson – 2009-08-26T09:13:01.667

27

My favorite way to do this is to use the help shortcut (cmd-shift-/), which brings the focus in Leopard up to the help bar. Then start typing the name of the command you want and it will filter the list below to the commands that fit your pattern. Just down arrow to the right one and it will actually show you where in the menus that command exists, along with any shortcuts assigned to it. Hit enter and it executes the command.

This makes more sense if you actually do it :).

This makes it really easy to search through all of your commands for the right one, and in a few keystrokes gives you access to all of the menu items.

Unfortunately this doesn't work anymore in Firefox (where you have to use the old ctrl-F2 way) because they hijacked the "help" shortcut to bring you to a stupid webpage that is never what I want.

Ted Naleid

Posted 2009-08-25T20:30:33.503

Reputation: 1 059

1damn, I can only upvote this once. – oferei – 2014-06-27T09:16:55.113

2+1 Oh, I like it. It's almost Quicksilver-like. I'd never got my head round what that 'search' on the help menu was for, given that it seemed to include menus and stuff - how neat. That's a tip I'll be using every day from now on. :-) – robsoft – 2009-08-26T07:46:44.963

2+1. WOW. I never knew that, and it is truly awesome! – John Rudy – 2009-08-26T20:22:40.463

sweet tip!!!!!! – bobobobo – 2009-11-09T18:18:23.360

2

According to http://www.xvsxp.com/misc/keyboard.php, if you hit Control-F2, you can navigate the menus just like in Windows: Left or right arrows, or type the first letter or so of a menu's name or a menu options name to select it, and enter works just like clicking the option.

As far as changing XCodes menu shortcuts, [you can just use the "Key Binding Preferences" in the XCode prefs dialog. http://developer.apple.com/documentation/DeveloperTools/Conceptual/XcodeWorkspace/300-Keyboard_Shortcuts/custom_key_equivalents.html#//apple_ref/doc/uid/TP40002706-SW2

Neito

Posted 2009-08-25T20:30:33.503

Reputation: 161

1

It's been several years since this question was asked, but for those who stumble upon this thread my answer to a similar question might be useful (link below).

In particular, those coming to Mac OS X from a PC/Windows background might look for something to replicate the behavior of the Alt accelerators in Windows, such as clicking Alt + F to highlight the File item on the menu, or to access various buttons in dialog boxes.

A nice feature that almost replicates the Windows Alt accelerators in an OS X dialog box is to use + + first_letter.

Sometimes it is possible to do only + first_letter, but this is not universal. For example, in a Save As dialog, + N fails to select New Folder. But + + N does the trick.

More details, including on how to access menu items using this technique can be found in my previous post.

Egalth

Posted 2009-08-25T20:30:33.503

Reputation: 181