MCPcopy Index your code
hub / github.com/plotly/plotly.py / InputDeviceState

Class InputDeviceState

plotly/callbacks.py:4–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2
3
4class InputDeviceState:
5 def __init__(
6 self, ctrl=None, alt=None, shift=None, meta=None, button=None, buttons=None, **_
7 ):
8 self._ctrl = ctrl
9 self._alt = alt
10 self._meta = meta
11 self._shift = shift
12 self._button = button
13 self._buttons = buttons
14
15 def __repr__(self):
16 return """\
17InputDeviceState(
18 ctrl={ctrl},
19 alt={alt},
20 shift={shift},
21 meta={meta},
22 button={button},
23 buttons={buttons})""".format(
24 ctrl=repr(self.ctrl),
25 alt=repr(self.alt),
26 meta=repr(self.meta),
27 shift=repr(self.shift),
28 button=repr(self.button),
29 buttons=repr(self.buttons),
30 )
31
32 @property
33 def alt(self):
34 """
35 Whether alt key pressed
36
37 Returns
38 -------
39 bool
40 """
41 return self._alt
42
43 @property
44 def ctrl(self):
45 """
46 Whether ctrl key pressed
47
48 Returns
49 -------
50 bool
51 """
52 return self._ctrl
53
54 @property
55 def shift(self):
56 """
57 Whether shift key pressed
58
59 Returns
60 -------
61 bool

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected