X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c66160d5d566482000a39fe5187dee69e11c9c56..ca77701441e39245dcbfce903049e76f166979e5:/include/wx/kbdstate.h?ds=sidebyside diff --git a/include/wx/kbdstate.h b/include/wx/kbdstate.h index b50c2a4fce..71e196db3c 100644 --- a/include/wx/kbdstate.h +++ b/include/wx/kbdstate.h @@ -28,6 +28,9 @@ public: m_shiftDown(shiftDown), m_altDown(altDown), m_metaDown(metaDown) +#ifdef __WXOSX__ + ,m_rawControlDown(false) +#endif { } @@ -52,7 +55,14 @@ public: } // returns true if any modifiers at all are pressed - bool HasModifiers() const { return GetModifiers() != wxMOD_NONE; } + bool HasAnyModifiers() const { return GetModifiers() != wxMOD_NONE; } + + // returns true if any modifiers changing the usual key interpretation are + // pressed, notably excluding Shift + bool HasModifiers() const + { + return ControlDown() || RawControlDown() || AltDown(); + } // accessors for individual modifier keys bool ControlDown() const { return m_controlDown; }