29

On Windows, every dialog box includes underlined letters that you can activate using the Alt key. I use these "Alt" keyboard shortcuts all the time; I'm missing them as I'm trying to switch to OSX.

On OSX, all I can find is Tab navigation, which requires you to press Tab seven or eight times to get anywhere in most dialog boxes. (And even that is hidden by default: you have to enable "Full keyboard access" in the "Keyboard & Mouse" control panel to be able to Tab between buttons.)

Is there some way I can get something like the Windows Alt accelerators for OSX dialogs? I'm willing to write Automator code, download/purchase software, etc.

Specifically, I'm imagining maybe something where you do some shortcut command and then start typing the name of the button, and hit Enter to push the button...?

29

In OSX there's no such thing as the "_" for dialogs like in Windows. However, you have:

esc → defaults to no/cancel

cmd + deldon't save (cmd + d before OS X Lion)

entersave/OK

spacebarclick selected button (use tab to move).

A quick Google search for "osx keyboard shortcuts" will teach you way more than you can memorize in one day, but you should; there are dozens and some are very valuable.

You can always add more/change some existing ones by going to System Preferences -> Keyboard & Mouse -> Keyboard Shortcuts, exactly where you activated "all controls".

But as far as I know, there's no "underscore" thing in OSX.

  • Also note the "keyboard navigation" section in the "keyboard shortcuts" tab of the Keyboard & Mouse preference pane, specifically the item "move focus to the menu bar". Not exactly what you wanted, but this allows you to navigate the menu bar and its menus using only the keyboard. – hasseg Aug 19 '09 at 13:33
  • 1
    tab seems to do nothing what is going on? – William Aug 21 '18 at 5:10
11

In addition to Martín's essential list of shortcuts (which work almost everywhere), you should know that in a File Open or File Save dialog you can press / or ~ to jump straight to a popup sheet that will let you type in a folder path. This is great for if you are a super fast typist, or if you want to go to a hidden folder like ~/.ssh.

That field even does Tab Completion, sort-of—the catch is if there are zero matches, or more than one match, when you press Tab, instead of doing any kind of completion Tab will just jump you out of the text field.

Also, when you're in the midst of quitting an app or closing a window, and there's a dialog saying "Cancel"/"Save"/"Don't Save" you can press D to choose "Don't Save." Obviously Esc and Return will operate the other two buttons, but I use this one all the time when I'm closing something I don't want to save.

  • Fantastic! Had no idea there is such an intuitive shortcut. Thank you! – kakyo Apr 5 '14 at 21:10
6

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

As noted by Louis, using only + first_letter works in some dialogs. For example, + D will choose Don't Save on exiting a file. (This is the same funcionality as first using to highlight Don't Save and then selecting it by clicking space, which works if System preferences --> Keyboard --> Keyboard Shortcuts --> Full Keyboard Access:... is set to All controls as described in previous posts).

However, + first_letter is not universal. For example, in a Save As dialog, + N fails to select New Folder.

But + + N does the trick.

I discovered this feature only recently, so I'm not sure if it is as universal as Windows Alt (which I'm using extensively). But by playing around I seem to be able to select most dialog items that I need. For example, I could use + + T to navigate in the dialog that opens in Microsoft Excel (for Mac) when I do Paste Special, and choose Text from a drop-down menu. So it selects not only buttons, but list items as well.

UPDATE: One limitation, however, compared with Windows Alt, seems to be that it's not possible to press the first-letter key multiple times to move between different objects that share the same first letter. In lists, this can be overcome to some extent by combining the shortcut with the arrow keys .

By the way, OS X has the shortcut ctrl + F2 for accessing the menu bar, but this is particularly inconvenient since it involves pressing fn to activate the F2 functionality. (What's more, others have reported problems with the default shortcut.)

The default shortcut can be re-defined in System preferences --> Keyboard --> Keyboard Shortcuts --> Keyboard & Text Input --> Move focus to the menu bar (it must involve two keys; I'm using + <, which feels familiar from Windows). Once the menu bar apple is highlighted, it is possible to accesss individual menu items by pressing a sequence of the relevant first letters. For example, in Firefox, I can go to File --> Page Setup... with this combo:

+ <, F, , P,

And contrary to dialogs, this functionality does indeed support pressing multiple times to navigate between list items, so that I can access File --> Print like so:

+ <, F, , P, P, (equivalent to + P).

It is actually not even necessary to press the relevant first letter, it's enough to press any letter to highlight the closest list item in alphabetical order (if no result is found, the search continues backwards in reverse order). For example, I can access Edit --> Undo (equivalent to + Z) like this:

+ <, E, , V (rather than the intuitive U).

4

I found this thread because I was searching for an answer for the same issue. I set "Full keyboard access", but this still apparently does not work in all circumstances.

In my example: when attempting to save over a file with the Replace File dialog, there are 2 buttons on screen: cancel and replace. The cancel button is always filled with a blue color, but the blue outline is displayed around the return button by default. It is possible to hit tab to move the blue outline, but hitting return will always count as if you clicked cancel (the button filled in with blue). That sounds confusing, because it is confusing!

I was fumbling around, and just discovered a new keyboard shortcut:


In the Replace File dialog:

cmd + r : selects the "replace" button.


(Adobe seems to be aware of this issue: when you select "Save for Web", a custom save dialog will be used, where it IS possible to simply hit return to use the "Replace" action (no need for tab).

  • I've been wishing for a shortcut for the "Replace File" button in the "Save As" dialog for ages, and you've found it - well done, very useful! – Mark Silberbauer Mar 21 '17 at 19:40
3

Ctrl-F7 allows you to toggle the ability press tab to select different buttons in any OS X dialogue window. This has been around since at least 2002.

The setting is under System Preferences > Keyboard > Shortcuts > Keyboard > "Change the way Tab moves focus" and defaults to Ctrl-F7.

  • With this information, OSX suddenly becomes usable! – Gary Chang Mar 11 '15 at 13:53
1

This is not possible in OS/X. And a key reason I do not prefer Macs.

The OP points out a critical failing in OS/X: the ability to rapidly - and with only the keyboard - select any entries (not just "OK / cancel", etc) in a dialog box. None of the suggestions above can do that.

A common example is: within a Find/Replace dialog I want to change from Case Sensitive to Case Insensitive. In Linux (and in windows) I can achieve that using only keystrokes. This is not possible in MAC: you have to use the mouse or fumble around with tabbing multiple times.

  • If you turn on Full Keyboard Access, then this is possible in most apps. Certainly ones designed properly. I've found the opposite of what you're saying. In Windows, shortcuts for things like "Select All" (Command-A) don't exist in every text field, the way they do on a Mac. (Not sure about Linux GUI environments, so I can't comment, but I don't remember them being super consistent. – XP84 Aug 10 '16 at 0:11
  • It is not possible in Find/Replace in most apps. – javadba Aug 10 '16 at 0:19
  • I don't know what apps you're using, but it works fine for me in TextMate: imgur.com/a/NWgze (note the halo there that I've tabbed into). Most stock apps I tested like Safari are using a little bar that comes down, which also allows tabbing to all the controls (also pictured). Nobody would dispute that apps vary, but any app can break the UI rules on any platform. It appears that you may not have enabled Full Keyboard Access. – XP84 Aug 10 '16 at 0:27
  • oh i know all about full keyboard access. Try Sublime text. Or intellij – javadba Aug 10 '16 at 0:48
  • FWIW, @javadba neither the Java toolkit used for Intellij nor Sublime use standard AppKit controls. Sublime Search and Replace is a custom widget at the bottom, and Intellij (and Android Studio) more often than not have problems with focus and windows that outlive lifecycle (dialogs floating even though you switched apps…) In part this is macOS’s fault (I agree its keyboard support is subpar in many areas), but from there to being a key reason not to use it is a little bit too much for me. There are many bad things about macOS (especially lately), but that one is not my top concern. – Martin Marconcini Aug 21 '18 at 16:39
1

The following is from User588 on Ask Different. It will allow you to tab to a button, where you can hit return. It also points out some irregularities.

Enable Keyboard Control of the UI

System Prefs > Keyboard

Then select "All Controls" button at the bottom, rather than just "Text boxes and lists only"

enter image description here

Keyboard Shortcuts

  • (TAB) will move between buttons.
  • esc (ESC) is cancel.
  • space (SPACE) selects the active button (blue, outline).
  • (RETURN) is OK or the default button (blue, pulsing, filled).
  • For some dialog boxes, +first_letter will select the button with a certain first letter in the text (as pointed out by @Griffo).
0

With soome dialogs like iTunes Song Info dialog, the shortcut to the OK button is fnenter

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.