Take the 2-minute tour ×
User Experience Stack Exchange is a question and answer site for user experience researchers and experts. It's 100% free, no registration required.

I started working for a software company, and while using the software we produce, I noticed that the dialogue boxes that we pop-up aren't closed with the [ESC] button.

I'm assuming this would be the default condition of a dialogue box, but I'm unaware if there's any standard that suggest the opposite or this condition to vary.

Could you provide guidance?

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

Closing the dialogue box using a shortcut should only be avalible if the message is not important:

  • Not seeing the whole message will not materially affect the operation of the application.
  • The user can easily recall and bring up that dialogue box again.
  • The content displayed in the dialogue box is a "notification" and does not warn the user that a significant event is about to occur.

If the above circumstances are true, then it is safe to allow the user to close the box using the [ESC] key. This is because [ESC] is often pressed as a reflex to make something go away.

If the dialogue box shows a message asking if the user wants to nuke the system, then binding the [ESC] key to the close action would be inappropriate.

share|improve this answer
    
Disallowing [Esc] goes against platform standards. Possibly the only scenario in which it is acceptable, is when the dialogue has more than a single button and does not have a default button. Otherwise disallowing [Esc] while [Enter] will automatically take the default, is somewhat futile. –  Marjan Venema Jun 18 '12 at 6:12
    
This is because [ESC] is often pressed as a reflex to make something go away. What do you build this on? –  AndroidHustle Jun 18 '12 at 8:44
    
@MarjanVenema can you clarify or link these platform standards? –  edgarator Jun 19 '12 at 0:46
    
@edgarator: sorry, no link, just working with Windows since version 2.3 (or some such, before 3.0 anyway) –  Marjan Venema Jun 19 '12 at 6:54
    
@MarjanVenema for some reason, I still find this the most suitable answer. As a user, I wouldn't like something to go away with ESCif is critical (and I'm assuming there wouldn't be many cases like this one). On the other hand, I'd like pretty much everything go away with ESC. What do you guys think? –  edgarator Jun 19 '12 at 22:49
show 1 more comment

Presuming you're talking about Windows and WinForms (the classical way of building desktop applications on Windows):

The escape key in Windows sends a click to the dialog's Form.CancelButton property. If you use standard drag-and-drop or simple dialog boxes, the CancelButton will already be specified as the appropriate button in the UI. If you produce custom dialogs/forms, you'll need to add a button for cancelling it, and tell the system that that button represents that form's CancelButton.

In the same way, you can hook up the Enter key to press a given button by specifying that button as the form's DefaultButton.

share|improve this answer
    
Hi @KitGrose, well, actually I'd like to talk programming-language agnostic, so that it's useful for everyone. However, my application is built in Java Swing... :) –  edgarator Jun 19 '12 at 0:43
1  
Right, but the behaviour is only a "default" given certain platforms. For instance Swing implements the DefaultButton property, but not the CancelButton property as a default. –  Kit Grose Jun 19 '12 at 2:05
    
Hence the usability standard that I'm looking for. Something that takes into consideration no programming language, but the user :) –  edgarator Jun 19 '12 at 5:53
    
The user's expectations are defined by convention, generally established by OS providers. We can show you the Apple HIG and MS UX guidelines to show that they suggest hooking up the escape key as a default, but those are conventions of those platforms not rules. If you're targeting some totally unusual platform, the rules may be different (like the backspace key going "Back" in Windows but not in OS X). –  Kit Grose Jun 20 '12 at 0:46
    
Hey @KitGrose stumbled upon The Rule of Least Astonishment, which talks about this. How we should take advantage of previous user knowledge which comes mainly inherited from OS's. :) –  edgarator Jun 25 '12 at 1:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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