diff --git a/src/commands/Keyboard.cpp b/src/commands/Keyboard.cpp index 194e2a138..6b052bd0e 100644 --- a/src/commands/Keyboard.cpp +++ b/src/commands/Keyboard.cpp @@ -43,13 +43,25 @@ wxString KeyStringNormalize(const wxString & key) #endif } -wxString KeyStringDisplay(const wxString & key) +wxString KeyStringDisplay(const wxString & key, bool useSspecialChars) { wxString newkey = KeyStringNormalize(key); #if defined(__WXMAC__) - newkey.Replace(wxT("XCtrl+"), wxT("Control+")); - newkey.Replace(wxT("Alt+"), wxT("Option+")); - newkey.Replace(wxT("Ctrl+"), wxT("Command+")); + + if (!useSspecialChars) { + // Compose user-visible keystroke names, all ASCII + newkey.Replace(wxT("XCtrl+"), wxT("Control+")); + newkey.Replace(wxT("Alt+"), wxT("Option+")); + newkey.Replace(wxT("Ctrl+"), wxT("Command+")); + } + else { + // Compuse user-visible keystroke names, with special characters + newkey.Replace(wxT("Shift+"), wxT("\u21e7")); + newkey.Replace(wxT("XCtrl+"), wxT("Control+")); + newkey.Replace(wxT("Alt+"), wxT("\u2325")); + newkey.Replace(wxT("Ctrl+"), wxT("\u2318")); + } + #endif return newkey; diff --git a/src/commands/Keyboard.h b/src/commands/Keyboard.h index 2f3ce7559..4f39e6663 100644 --- a/src/commands/Keyboard.h +++ b/src/commands/Keyboard.h @@ -14,5 +14,5 @@ #include wxString KeyStringNormalize(const wxString & key); -wxString KeyStringDisplay(const wxString & key); +wxString KeyStringDisplay(const wxString & key, bool useSpecialChars = false); wxString KeyEventToKeyString(const wxKeyEvent & keyEvent);