]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/dlgcmn.cpp
adding principal class for command line builds (High Resolution Support), changing...
[wxWidgets.git] / src / common / dlgcmn.cpp
index d95dafd786f832ecaee0351a8096f8840e7a2c0e..5cbbc7e390ba3c85899705ddd54716c17abbf5ec 100644 (file)
@@ -461,14 +461,16 @@ bool wxDialogBase::SendCloseButtonClickEvent()
 
 bool wxDialogBase::IsEscapeKey(const wxKeyEvent& event)
 {
-    // for most platforms, Esc key is used to close the dialogs
-    return event.GetKeyCode() == WXK_ESCAPE &&
-                event.GetModifiers() == wxMOD_NONE;
+    // For most platforms, Esc key is used to close the dialogs.
+    //
+    // Notice that we intentionally don't check for modifiers here, Shift-Esc,
+    // Alt-Esc and so on still close the dialog, typically.
+    return event.GetKeyCode() == WXK_ESCAPE;
 }
 
 void wxDialogBase::OnCharHook(wxKeyEvent& event)
 {
-    if ( event.GetKeyCode() == WXK_ESCAPE )
+    if ( IsEscapeKey(event) )
     {
         if ( SendCloseButtonClickEvent() )
         {