X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8b9e09383acad70d338f233bbcc7327463757c23..66c2bf7b1d9326fb650acfaae22ec50528cfbf7c:/include/wx/kbdstate.h?ds=inline diff --git a/include/wx/kbdstate.h b/include/wx/kbdstate.h index 93412c975f..ab0df32d1c 100644 --- a/include/wx/kbdstate.h +++ b/include/wx/kbdstate.h @@ -3,7 +3,6 @@ // Purpose: Declaration of wxKeyboardState class // Author: Vadim Zeitlin // Created: 2008-09-19 -// RCS-ID: $Id$ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -28,6 +27,9 @@ public: m_shiftDown(shiftDown), m_altDown(altDown), m_metaDown(metaDown) +#ifdef __WXOSX__ + ,m_rawControlDown(false) +#endif { } @@ -45,12 +47,21 @@ public: return (m_controlDown ? wxMOD_CONTROL : 0) | (m_shiftDown ? wxMOD_SHIFT : 0) | (m_metaDown ? wxMOD_META : 0) | +#ifdef __WXOSX__ (m_rawControlDown ? wxMOD_RAW_CONTROL : 0) | +#endif (m_altDown ? wxMOD_ALT : 0); } // 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; }