Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Keyboard Shortcut for clicking on "cancel" or "ok"

Keyboard Shortcut for clicking on "cancel" or "ok"
Thread Tools
badtz
Mac Elite
Join Date: May 2002
Location: Los Angeles, CA.
Status: Offline
Reply With Quote
Sep 15, 2007, 08:35 AM
 
Sometimes you get dialog boxes that require a click on "cancel" or "ok" (also when you install packages you have to click on those aqua buttons to get to the next screen) ...

Is there any way to invoke these via key strokes?

     
Sherman Homan
Mac Elite
Join Date: Sep 2006
Status: Offline
Reply With Quote
Sep 15, 2007, 08:42 AM
 
Absolutely yes... usually!
Apple and the period key together will usually cancel a dialog box. Hitting Enter or Return will usually give the OK button. It gets a little ugly when the dialog box comes up with Cancel as the default, highlighted button. Then you have to manually click OK, this is only found when the installer's developer dudes want you to really think twice about automatically running it.
     
Wiskedjak
Posting Junkie
Join Date: Jun 2002
Location: Calgary
Status: Offline
Reply With Quote
Sep 15, 2007, 08:52 AM
 
This has always annoyed me. Windows has much better usability in this regard.
     
JKT
Professional Poster
Join Date: Jan 2002
Location: London, UK
Status: Offline
Reply With Quote
Sep 15, 2007, 09:47 AM
 
If you have full keyboard access on, the blue focus ring around the button indicates which will be depressed if you press the spacebar. Tab changes the focus.
     
JKT
Professional Poster
Join Date: Jan 2002
Location: London, UK
Status: Offline
Reply With Quote
Sep 15, 2007, 09:52 AM
 
Originally Posted by Wiskedjak View Post
This has always annoyed me. Windows has much better usability in this regard.
Um, no. It is just that the keyboard shortcuts for Windows dialogues are more self-evident. As well as FKA tab/spacebar you also have the following for selecting buttons in dialogues:

Escape = Cancel
Command-S = Save
Command-D = Don't Save
Command-O = Open

These shortcuts have been around since OS 7.5 at least iirc.
     
~bash $
Forum Regular
Join Date: Feb 2007
Status: Offline
Reply With Quote
Sep 15, 2007, 10:01 AM
 
I actually agree that Windows keyboard navigation is better integrated. (That must be heresy around here!) However, the Universal Access discussed above gives you similar navigational ability. Prepare to be annoyed when every single toolbar item gets highlighted while you're <tab>ing through an app.
     
JKT
Professional Poster
Join Date: Jan 2002
Location: London, UK
Status: Offline
Reply With Quote
Sep 15, 2007, 10:18 AM
 
Originally Posted by ~bash $ View Post
I actually agree that Windows keyboard navigation is better integrated. (That must be heresy around here!)
There's no disagreement with that at all. However, we aren't talking about navigation of the entire OS or an application's file menus, but of two or three buttons in dialogues and this has been just as easy in the Mac OS as it has in Windows for many, many years.
     
Wiskedjak
Posting Junkie
Join Date: Jun 2002
Location: Calgary
Status: Offline
Reply With Quote
Sep 15, 2007, 11:53 AM
 
Originally Posted by JKT View Post
Um, no. It is just that the keyboard shortcuts for Windows dialogues are more self-evident.
self-evident = better usability

I've never found hidden and pro-user commands to equal good usability.
     
dimmer
Mac Enthusiast
Join Date: Feb 2006
Status: Offline
Reply With Quote
Sep 15, 2007, 09:42 PM
 
And why does every control in Windows need to be keyboard activated? Because you can't assume everyone has a mouse. All Mac users can be assumed to have a mouse (or trackpad), so you don't need all of the ugly/crass little underscores in every control.

So it's not as if this was something that MS thought about and decided would be a good idea: it's just something they couldn't not do.

Also, the Windows UI Guidelines are never followed correctly, and many dialogs use "Yes" "No", others use "Cancel" and "Ok", others only have one control. And no, you can't assume the same keystrokes will do the same thing in different dialogs.

Full Keyboard Access gives any Mac user who needs it a similar function.
     
analogika
Posting Junkie
Join Date: Feb 2005
Location: 888500128
Status: Offline
Reply With Quote
Sep 16, 2007, 06:10 AM
 
Cancel = Escape

The blue pulsing button always = Return or Enter.

With full keyboard control, as mentioned above, you get a blue halo around the button. Tab through to the one you want (Shift-Tab for the opposite direction) and hit Space bar.


The reasons full keyboard control isn't implemented the way it is on Windows are a) that the Windows way makes it too easy to do something destructive accidentally (D or S? Which did I just...?), and b) the key commands are not consistent - they depend upon the wording used by the programmer of the dialog box buttons, and upon the application's language.

Also, in Windows, you also have Cancel = Escape, but on the Mac, Return or Enter always select the non-destructive option.
     
JKT
Professional Poster
Join Date: Jan 2002
Location: London, UK
Status: Offline
Reply With Quote
Sep 16, 2007, 07:04 AM
 
Originally Posted by dimmer View Post
Also, the Windows UI Guidelines are never followed correctly, and many dialogs use "Yes" "No", others use "Cancel" and "Ok", others only have one control. And no, you can't assume the same keystrokes will do the same thing in different dialogs.
Unfortunately, there are also (too many) instances of this that have crept into OS X as well. E.g. Erase Junk mail in Apple's Mail presents a dialogue of Yes, No and Cancel instead of Erase, Don't Erase and Cancel; Erase Deleted Messages similarly uses Cancel and OK (so they aren't even consistent in their poor choice of wording!). iTunes presents another dialogue that is similarly poorly worded (though I forget what for) and there are examples of third party apps that are equally as bad (e.g. RapidWeaver 2.6 uses OK for a dialogue during publishing).
     
JKT
Professional Poster
Join Date: Jan 2002
Location: London, UK
Status: Offline
Reply With Quote
Sep 16, 2007, 07:06 AM
 
Originally Posted by Wiskedjak View Post
self-evident = better usability

I've never found hidden and pro-user commands to equal good usability.
Fair point, but you still have to learn what the underscores mean (and the keys required to access them in other aspects of the OS) in Windows to be able to use them. I would also call that a hidden and "pro"-user feature.
     
jbleisure
Mac Enthusiast
Join Date: May 2005
Location: Bristol
Status: Offline
Reply With Quote
Sep 16, 2007, 07:39 AM
 
Apple and the period key together will usually cancel a dialog box.
Cancel = Escape
Amazing - thanks I never knew that.
     
Simon
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Sep 16, 2007, 09:12 AM
 
I'd like to see them add cmd-1 to cmd-n to highlight buttons from left to right as a kind of 'hidden pro feature'. There are situations where I want to keep my hands on the keyboard and I can't because the stupid dialog forces me to use the mouse.
     
dimmer
Mac Enthusiast
Join Date: Feb 2006
Status: Offline
Reply With Quote
Sep 16, 2007, 12:14 PM
 
The command 1 - Command n thing is interesting, but there should be a better way (having to count buttons, get the # of the button I want, then hit Cmd-whatever -- just not very visual.) Would greyed out buttons count? Plus what happens to a non-modal dialog box?

I can see a user hitting Cmd-n and not knowing what they just did and getting confused.

There was an application from OS 9 days that, when you hit the Cmd key, gave descriptions of keyboard equivalents on each of the controls. That was slick. And it didn't add much clutter either.
     
Wiskedjak
Posting Junkie
Join Date: Jun 2002
Location: Calgary
Status: Offline
Reply With Quote
Sep 16, 2007, 12:32 PM
 
How about, when a dialog box show up, arrow keys can be use to toggle between buttons?
     
Simon
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Sep 16, 2007, 02:18 PM
 
Originally Posted by Wiskedjak View Post
How about, when a dialog box show up, arrow keys can be use to toggle between buttons?
     
Simon
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Sep 16, 2007, 02:20 PM
 
Originally Posted by dimmer View Post
The command 1 - Command n thing is interesting, but there should be a better way (having to count buttons, get the # of the button I want, then hit Cmd-whatever -- just not very visual.)
If you have many buttons that would indeed be a pain. I was thinking of my usual dialog which has two to three buttons max.

But of course there are dialogs that have more choices and then that solution would be somewhat messy. Anyway, I like Wiskedjak's idea of using arrow keys even better.
     
analogika
Posting Junkie
Join Date: Feb 2005
Location: 888500128
Status: Offline
Reply With Quote
Sep 16, 2007, 04:35 PM
 
Tab to switch buttons and Space to select works just fine for me.
     
Wiskedjak
Posting Junkie
Join Date: Jun 2002
Location: Calgary
Status: Offline
Reply With Quote
Sep 16, 2007, 05:10 PM
 
Tabbing to switch buttons doesn't work in Office and Adobe dialog boxes. However, Adobe and Microsoft were nice enough to add to MacOS usability by enabling Windows-style keyboard shortcuts (eg: 'D' for "Don't Save", 'C' for "Cancel", and 'S' for Save"). So, if I want to close a file but don't want to save it and I don't have my hand on my mouse, I can simply press 'D'.
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Sep 16, 2007, 05:50 PM
 
Because command-D would have been so much more burdensome.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Wiskedjak
Posting Junkie
Join Date: Jun 2002
Location: Calgary
Status: Offline
Reply With Quote
Sep 16, 2007, 10:12 PM
 
Less keystrokes are always better. Combination keystrokes are not good for non-pro users.
     
analogika
Posting Junkie
Join Date: Feb 2005
Location: 888500128
Status: Offline
Reply With Quote
Sep 17, 2007, 02:59 AM
 
Originally Posted by Wiskedjak View Post
Less keystrokes are always better. Combination keystrokes are not good for non-pro users.
Key control of dialog buttons is not good for non-pro users.
     
analogika
Posting Junkie
Join Date: Feb 2005
Location: 888500128
Status: Offline
Reply With Quote
Sep 17, 2007, 03:02 AM
 
Originally Posted by Wiskedjak View Post
Tabbing to switch buttons doesn't work in Office and Adobe dialog boxes. However, Adobe and Microsoft were nice enough to add to MacOS usability by enabling Windows-style keyboard shortcuts (eg: 'D' for "Don't Save", 'C' for "Cancel", and 'S' for Save"). So, if I want to close a file but don't want to save it and I don't have my hand on my mouse, I can simply press 'D'.
So because standard system functionality is BROKEN in Adobe applications, they added a NON-standard interface, and you think this is "usability" that improves the interface?

BTW, tabbing and then hitting space works just fine in my copy of Microsoft Word 2004. I don't have any Adobe apps, so I can't check that.
     
badtz  (op)
Mac Elite
Join Date: May 2002
Location: Los Angeles, CA.
Status: Offline
Reply With Quote
Sep 17, 2007, 04:16 AM
 
Example:

Type COMMAND + P

It will bring up the print dialog box

apple + period = allows you to cancel

enter = in this case, the print button is highlighted by default (this is not always the case though, an example of this would be in pkg installers. iLife, etc.)

is there any way to access PDF, PREVIEW, and SUPPLIES via keyboard shortcuts?

[thanks sherman for the apple + period tip, I never knew ]
     
analogika
Posting Junkie
Join Date: Feb 2005
Location: 888500128
Status: Offline
Reply With Quote
Sep 17, 2007, 10:17 AM
 
Originally Posted by badtz View Post
Example:

Type COMMAND + P

It will bring up the print dialog box

apple + period = allows you to cancel

enter = in this case, the print button is highlighted by default (this is not always the case though, an example of this would be in pkg installers. iLife, etc.)

is there any way to access PDF, PREVIEW, and SUPPLIES via keyboard shortcuts?
Shift-Tab about five times (or forward-tab about twenty, thanks to Microsoft's non-standard print dialog).

Hit Space bar.
     
kuchiki
Fresh-Faced Recruit
Join Date: Sep 2007
Status: Offline
Reply With Quote
Sep 17, 2007, 11:29 AM
 
What also is a possibility is Steermouse. It's not exactly what the thread opener asked for but with Steermouse you can have your mouse cursor move automatically to the predefined button (whether it be OK, Cancel, Close button).

kuchiki
My newly created blog about the Macbook and home of iMountIt
News, Reviews, Tutorials, Giveaways and more.
Visit: Days of our Macbooks
     
Brass
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status: Offline
Reply With Quote
Sep 17, 2007, 06:05 PM
 
My favourite dialogue box is in a backup application I use at work. The text ends with the question, "OK to cancel?" and presents the buttons "OK" and "Cancel".

I've been using this application for 8 years, and it still confuses me every time that box appears (not often, thankfully)!
     
badtz  (op)
Mac Elite
Join Date: May 2002
Location: Los Angeles, CA.
Status: Offline
Reply With Quote
Sep 17, 2007, 07:25 PM
 
Here's another one:

When you enter your username/password on a website with safari with Keychain enabled.

It'll pop up a message asking to save your username/password with the options: Never for this website, Not Now, Yes.

Default is on YES, but what if I want to choose one of the other options without the mouse?
     
Wiskedjak
Posting Junkie
Join Date: Jun 2002
Location: Calgary
Status: Offline
Reply With Quote
Sep 17, 2007, 08:30 PM
 
These are all perfect examples. Good usability is an easter-egg in MacOS.
     
analogika
Posting Junkie
Join Date: Feb 2005
Location: 888500128
Status: Offline
Reply With Quote
Sep 17, 2007, 09:06 PM
 
Originally Posted by badtz View Post
Here's another one:

When you enter your username/password on a website with safari with Keychain enabled.

It'll pop up a message asking to save your username/password with the options: Never for this website, Not Now, Yes.

Default is on YES, but what if I want to choose one of the other options without the mouse?
Works PERFECTLY using Tab and space.
     
analogika
Posting Junkie
Join Date: Feb 2005
Location: 888500128
Status: Offline
Reply With Quote
Sep 17, 2007, 09:08 PM
 
Originally Posted by Wiskedjak View Post
These are all perfect examples. Good usability is an easter-egg in MacOS.
What are you talking about?

*Consistency* is the number one principle in usability.

I have yet to find a single example where the built-in tab/shift-tab/space navigation won't work.

Brass's example is one of stupidly labeled dialog buttons. How does that in any way relate to being able to use keyboard short-cuts to select them? (I'll answer that for you: It *doesn't*. At all.)
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Sep 17, 2007, 09:23 PM
 
Originally Posted by Wiskedjak View Post
These are all perfect examples. Good usability is an easter-egg in MacOS.
It depends on your perspective. In absolute terms, Mac OS X has some usability problems. Compared to every other operating system on the planet, Mac OS X is fantastic.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Brass
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status: Offline
Reply With Quote
Sep 17, 2007, 11:07 PM
 
Originally Posted by analogika View Post
What are you talking about?

*Consistency* is the number one principle in usability.

I have yet to find a single example where the built-in tab/shift-tab/space navigation won't work.

Brass's example is one of stupidly labeled dialog buttons. How does that in any way relate to being able to use keyboard short-cuts to select them? (I'll answer that for you: It *doesn't*. At all.)
Agreed. My example wasn't even a Mac OS X example... it was for some commercial software I use under Solaris. As as you correctly said, I was only presenting it as an example of stupid button labelling. Was supposed to be funny.
     
Simon
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Sep 18, 2007, 03:12 AM
 
In Safari hit cmd-p to print and then try to hit the 'Preview' button w/o using the mouse. Why cmd-arrows can't change the button focus is beyond me. Usability? Nope.
     
TETENAL
Addicted to MacNN
Join Date: Aug 2004
Location: FFM
Status: Offline
Reply With Quote
Sep 18, 2007, 04:37 AM
 
Originally Posted by Simon View Post
Why cmd-arrows can't change the button focus is beyond me. Usability? Nope.
Because the tab-key changes the button focus. What's your problem?
     
Simon
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Sep 18, 2007, 05:51 AM
 
Originally Posted by TETENAL View Post
Because the tab-key changes the button focus. What's your problem?
The problem is that that doesn't work. Tab moves the cursor to the next text entry field ("Copies" -> "From" -> "To" etc.). It has no influence at all on the selected buttons.
     
TETENAL
Addicted to MacNN
Join Date: Aug 2004
Location: FFM
Status: Offline
Reply With Quote
Sep 18, 2007, 06:07 AM
 
Originally Posted by Simon View Post
The problem is that that doesn't work. Tab moves the cursor to the next text entry field ("Copies" -> "From" -> "To" etc.). It has no influence at all on the selected buttons.
It has already been mentioned that Full Keyboard access has to be turned on (System Preferences->Keyboard & Mouse->Keyboard Shortcuts->Full keyboard access->All controls). It definitely works.
     
Kevin
Baninated
Join Date: Oct 2002
Location: In yer threads
Status: Offline
Reply With Quote
Sep 18, 2007, 06:27 AM
 
Originally Posted by Wiskedjak View Post
I've never found hidden and pro-user commands to equal good usability.
Hidden? Pro User?
     
analogika
Posting Junkie
Join Date: Feb 2005
Location: 888500128
Status: Offline
Reply With Quote
Sep 18, 2007, 02:48 PM
 
Originally Posted by Simon View Post
In Safari hit cmd-p to print and then try to hit the 'Preview' button w/o using the mouse. Why cmd-arrows can't change the button focus is beyond me. Usability? Nope.
Yes? I just tried it?

I hit Cmd-P and tabbed five times, then hit the down arrow and selected "Print to PDF" with the space bar.

Is there some point you're making that I'm missing?

What's this blather about Cmd-arrows? Turn on keyboard access and tab through!
     
jbleisure
Mac Enthusiast
Join Date: May 2005
Location: Bristol
Status: Offline
Reply With Quote
Sep 18, 2007, 05:56 PM
 
I hit Cmd-P and tabbed five times, then hit the down arrow and selected "Print to PDF" with the space bar.
I just tried it too. It definitely works but I had to go into system preference and turn on full keyboard access. Man, I just learned that after switching nearly 3 years ago......I often wondered why you couldn't do it!!
     
badtz  (op)
Mac Elite
Join Date: May 2002
Location: Los Angeles, CA.
Status: Offline
Reply With Quote
Sep 18, 2007, 09:07 PM
 
Originally Posted by TETENAL View Post
It has already been mentioned that Full Keyboard access has to be turned on (System Preferences->Keyboard & Mouse->Keyboard Shortcuts->Full keyboard access->All controls). It definitely works.
that's not convenient, because with that turned on, you have to tab through ALL of the fields (many of which I'll never want). In this dialog that might not be the case, but in many others, it would take too many tabs to get to where I need it to be.
     
analogika
Posting Junkie
Join Date: Feb 2005
Location: 888500128
Status: Offline
Reply With Quote
Sep 19, 2007, 03:01 AM
 
Shift-Tab goes the opposite way, which often helps, but yes - I often find it more convenient to move my index finger 10 cm to the trackpad in complex dialog boxes .
     
Simon
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Sep 19, 2007, 03:37 AM
 
Originally Posted by analogika View Post
What's this blather about Cmd-arrows?
There's no be to rude.

The point is that full keyboard access requires you to tab through all GUI elements be that text entry fields, buttons or menus (just as badtz pointed out above). The cmd-arrows suggestion would allow you to specifically switch the focus on buttons alone. Tab for entry fields would remain the way it is. This is a suggestion for an improvement in Leopard. It's a simple discussion. Nobody is being forced to do anything.
     
himself
Mac Elite
Join Date: Jan 2002
Location: Live at the BBQ
Status: Offline
Reply With Quote
Sep 19, 2007, 06:43 PM
 
There are some apps (in particular, some from Bare Bones Software) that will show you the keyboard equivalent when you hold down command. This option appears to be something that the developer has to add themselves, but it would be good if it was automatically available system wide. A lot of apps in the OS 7-9 days had this functionality.
"Bill Gates can't guarantee Windows... how can you guarantee my safety?"
-John Crichton
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 04:23 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,