]> git.saurik.com Git - wxWidgets.git/commitdiff
Only call use uppercase letter if control, alt, or shift is held down,
authorGilles Depeyrot <gilles_depeyrot@mac.com>
Sat, 1 Feb 2003 13:45:49 +0000 (13:45 +0000)
committerGilles Depeyrot <gilles_depeyrot@mac.com>
Sat, 1 Feb 2003 13:45:49 +0000 (13:45 +0000)
otherwise lower case accelerators won't work.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/menucmn.cpp

index 05bb4f7f8c1c8ef5ede084d4eee852280b571fea..707646dfa7431b47d69abbcd6685a8a257003c3f 100644 (file)
@@ -132,7 +132,13 @@ wxAcceleratorEntry *wxGetAccelFromString(const wxString& label)
         else {
             if ( current.Len() == 1 ) {
                 // it's a letter
-                keyCode = wxToupper(current[0U]);
+                keyCode = current[0U];
+
+                // Only call wxToupper if control, alt, or shift is held down,
+                // otherwise lower case accelerators won't work.
+                if (accelFlags != wxACCEL_NORMAL) {
+                    keyCode = wxToupper(keyCode);
+                }
             }
             else {
                 // is it a function key?