From: Robin Dunn Date: Fri, 10 Feb 2006 18:32:41 +0000 (+0000) Subject: Add wx.KeyEvent.GetModifiers X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/488867abe85683496d1af1b0fd76f0f515c94f06 Add wx.KeyEvent.GetModifiers git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/src/_event.i b/wxPython/src/_event.i index ce01fce0c9..3a0d4194e4 100644 --- a/wxPython/src/_event.i +++ b/wxPython/src/_event.i @@ -1219,6 +1219,17 @@ public: * ", ""); + DocDeclStr( + int, GetModifiers() const, + "Returns a bitmask of the current modifier settings. Can be used to +check if the key event has exactly the given modifiers without having +to explicitly check that the other modifiers are not down. For +example:: + + if event.GetModifers() == wx.MOD_CONTROL: + DoSomething() +", ""); + DocDeclStr( bool , ControlDown() const, "Returns ``True`` if the Control key was down at the time of the event.", "");