From: Gilles Depeyrot Date: Sat, 1 Feb 2003 13:45:49 +0000 (+0000) Subject: Only call use uppercase letter if control, alt, or shift is held down, X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c921fd5994d6d22b08ec98512eb59ee6f8939460 Only call use uppercase letter if control, alt, or shift is held down, otherwise lower case accelerators won't work. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/menucmn.cpp b/src/common/menucmn.cpp index 05bb4f7f8c..707646dfa7 100644 --- a/src/common/menucmn.cpp +++ b/src/common/menucmn.cpp @@ -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?