1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-09-24 16:01:16 +02:00

Bug1652: Should show Mac Control [sic] modifier in menu shortcuts...

... This is distinct from Command, and it abbreviates as the caret ^ character.

Also:  show caret instead of "Control" in toolbar button tips, though that
is not done for any default key bindings.
This commit is contained in:
Paul Licameli 2017-07-21 17:33:49 -04:00
parent 1ef235c21c
commit 3218351a79

View File

@ -18,11 +18,11 @@ wxString KeyStringNormalize(const wxString & key)
#if defined(__WXMAC__)
wxString newkey;
wxString temp = key;
temp.Replace(wxT("XCtrl+"), wxT("Control+"));
temp.Replace(wxT("RawCtrl+"), wxT("Control+"));
temp.Replace(wxT("Ctrl+"), wxT("Command+"));
if (temp.Contains(wxT("Control+"))) {
newkey += wxT("XCtrl+");
newkey += wxT("RawCtrl+");
}
if (temp.Contains(wxT("Alt+")) || temp.Contains(wxT("Option+"))) {
@ -51,14 +51,14 @@ wxString KeyStringDisplay(const wxString & key, bool usesSpecialChars)
if (!usesSpecialChars) {
// Compose user-visible keystroke names, all ASCII
newkey.Replace(wxT("XCtrl+"), wxT("Control+"));
newkey.Replace(wxT("RawCtrl+"), wxT("Control+"));
newkey.Replace(wxT("Alt+"), wxT("Option+"));
newkey.Replace(wxT("Ctrl+"), wxT("Command+"));
}
else {
// Compuse user-visible keystroke names, with special characters
// Compose user-visible keystroke names, with special characters
newkey.Replace(wxT("Shift+"), wxT("\u21e7"));
newkey.Replace(wxT("XCtrl+"), wxT("Control+"));
newkey.Replace(wxT("RawCtrl+"), '^');
newkey.Replace(wxT("Alt+"), wxT("\u2325"));
newkey.Replace(wxT("Ctrl+"), wxT("\u2318"));
}
@ -85,7 +85,7 @@ wxString KeyEventToKeyString(const wxKeyEvent & event)
#if defined(__WXMAC__)
if (event.RawControlDown())
newStr += wxT("XCtrl+");
newStr += wxT("RawCtrl+");
#endif
if (event.RawControlDown() && key >= 1 && key <= 26)