/usr/include/wx-3.0/wx/wxPython/i_files/_keyboardstate.i is in python-wxgtk3.0-dev 3.0.2.0+dfsg-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | /////////////////////////////////////////////////////////////////////////////
// Name: _keyboardstate.i
// Purpose: SWIG interface for wx.KeyboardState
//
// Author: Robin Dunn
//
// Created: 1-Feb-2010
// RCS-ID: $Id$
// Copyright: (c) 2010 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
// Not a %module
//---------------------------------------------------------------------------
%newgroup;
DocStr(wxKeyboardState,
"wx.KeyboardState stores the state of the keyboard modifier keys", "");
class wxKeyboardState
{
public:
wxKeyboardState(bool controlDown = false,
bool shiftDown = false,
bool altDown = false,
bool metaDown = false);
~wxKeyboardState();
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()
", "");
%property(Modifiers, GetModifiers, doc="See `GetModifiers`");
DocDeclStr(
bool , ControlDown() const,
"Returns ``True`` if the Control key was down at the time of the event.", "");
bool RawControlDown() const;
void SetRawControlDown(bool down);
DocDeclStr(
bool , MetaDown() const,
"Returns ``True`` if the Meta key was down at the time of the event.", "");
DocDeclStr(
bool , AltDown() const,
"Returns ``True`` if the Alt key was down at the time of the event.", "");
DocDeclStr(
bool , ShiftDown() const,
"Returns ``True`` if the Shift key was down at the time of the event.", "");
DocDeclStr(
bool , CmdDown() const,
"\"Cmd\" is a pseudo key which is the same as Control for PC and Unix
platforms but the special \"Apple\" (a.k.a as \"Command\") key on
Macs. It makes often sense to use it instead of, say, `ControlDown`
because Cmd key is used for the same thing under Mac as Ctrl
elsewhere. The Ctrl still exists, it's just not used for this
purpose. So for non-Mac platforms this is the same as `ControlDown`
and Macs this is the same as `MetaDown`.", "");
DocDeclStr(
bool , HasModifiers() const,
"Returns true if either CTRL or ALT keys was down at the time of the
key event. Note that this function does not take into account neither
SHIFT nor META key states (the reason for ignoring the latter is that
it is common for NUMLOCK key to be configured as META under X but the
key presses even while NUMLOCK is on should be still processed
normally).", "");
void SetControlDown(bool down);
void SetShiftDown(bool down);
void SetAltDown(bool down);
void SetMetaDown(bool down);
%pythoncode {
controlDown = property(ControlDown, SetControlDown)
rawControlDown = property(RawControlDown, SetRawControlDown)
shiftDown = property(ShiftDown, SetShiftDown)
altDown = property(AltDown, SetAltDown)
metaDown = property(MetaDown, SetMetaDown)
cmdDown = property(CmdDown)
# For 2.8 compatibility
m_controlDown = wx.deprecated(controlDown)
m_shiftDown = wx.deprecated(shiftDown)
m_altDown = wx.deprecated(altDown)
m_metaDown = wx.deprecated(metaDown)
}
};
|