supporting rawctrl strings, fixes #13496, rawctrl is correctly interpreted for all platforms
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69853 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -186,6 +186,8 @@ wxAcceleratorEntry::ParseAccel(const wxString& text, int *flagsOut, int *keyOut)
|
|||||||
accelFlags |= wxACCEL_ALT;
|
accelFlags |= wxACCEL_ALT;
|
||||||
else if ( CompareAccelString(current, wxTRANSLATE("shift")) )
|
else if ( CompareAccelString(current, wxTRANSLATE("shift")) )
|
||||||
accelFlags |= wxACCEL_SHIFT;
|
accelFlags |= wxACCEL_SHIFT;
|
||||||
|
else if ( CompareAccelString(current, wxTRANSLATE("rawctrl")) )
|
||||||
|
accelFlags |= wxACCEL_RAW_CTRL;
|
||||||
else // not a recognized modifier name
|
else // not a recognized modifier name
|
||||||
{
|
{
|
||||||
// we may have "Ctrl-+", for example, but we still want to
|
// we may have "Ctrl-+", for example, but we still want to
|
||||||
@@ -311,6 +313,10 @@ wxString wxAcceleratorEntry::ToString() const
|
|||||||
text += _("Ctrl+");
|
text += _("Ctrl+");
|
||||||
if ( flags & wxACCEL_SHIFT )
|
if ( flags & wxACCEL_SHIFT )
|
||||||
text += _("Shift+");
|
text += _("Shift+");
|
||||||
|
#if defined(__WXMAC__) || defined(__WXCOCOA__)
|
||||||
|
if ( flags & wxACCEL_RAW_CTRL )
|
||||||
|
text += _("RawCtrl+");
|
||||||
|
#endif
|
||||||
|
|
||||||
const int code = GetKeyCode();
|
const int code = GetKeyCode();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user