Home | History | Annotate | Download | only in input

Lines Matching refs:events

13 """ Read properties and events of a linux input device. """
41 """ A Valuator used for EV_SW (switch) events """
47 An AbsValuator, used for EV_ABS events stores a value as well as other
104 A linux kernel "evdev" device sends a stream of "input events".
105 These events are grouped together into "input reports", which is a set of
106 input events ending in a single EV_SYN/SYN_REPORT event.
115 Absolute valuators are only for EV_ABS events. They have more fields:
120 The evdev protocol is stateful. Input events are only sent when the values
122 events emenating from the kernel.
140 valuator events apply.
158 self.events = {} # dict { ev_type : dict { ev_code : Valuator } }
182 Returns True for EV_SYN/SYN_REPORT events to indicate that a complete
185 Returns False for other events.
187 Events not supported by this device are silently ignored.
189 For MT events, updates the slot valuator value for the current slot.
190 If current slot is the 'primary' slot, also updates the events entry.
192 For all other events, updates the corresponding valuator value.
196 elif ev.type not in self.events or ev.code not in self.events[ev.type]:
203 # update the events[] entry, too.
205 self.events[ev.type][ev.code].value = ev.value
207 self.events[ev.type][ev.code].value = ev.value
260 self.events[ev_type] = {}
271 self.events[ev_type][c] = self._ioctl_absinfo(c)
273 self.events[ev_type][c] = self._ioctl_get_switch(c)
275 self.events[ev_type][c] = Valuator()
310 # Iterate through the absolute mt events that are supported.
312 if c not in self.events[EV_ABS]:
328 dict containing all of the MT valuators from the events dict.
333 ev_abs = self.events[EV_ABS]
356 return self.events[EV_ABS][ABS_MT_SLOT].value
415 if (not type in self.events) or (not code in self.events[type]):
419 return self.events[type][code]
517 return ((EV_KEY in self.events) and
518 (BTN_TOOL_FINGER in self.events[EV_KEY]) and
519 (EV_ABS in self.events))
522 return ((EV_KEY in self.events) and
523 (KEY_F2 in self.events[EV_KEY]))
526 return ((EV_KEY in self.events) and
527 (BTN_TOUCH in self.events[EV_KEY]) and
528 (not BTN_TOOL_FINGER in self.events[EV_KEY]) and
529 (EV_ABS in self.events))
532 return self.is_mt() and ABS_MT_SLOT in self.events[EV_ABS]
535 return self.is_mt() and ABS_MT_SLOT not in self.events[EV_ABS]
538 return (EV_ABS in self.events and
539 (set(self.events[EV_ABS]) & set(ABS_MT_RANGE)))
542 return (EV_SW in self.events and
543 SW_HEADPHONE_INSERT in self.events[EV_SW])
546 return (EV_SW in self.events and
547 SW_MICROPHONE_INSERT in self.events[EV_SW])
550 return (EV_SW in self.events and
551 ((SW_HEADPHONE_INSERT in self.events[EV_SW]) or
552 (SW_MICROPHONE_INSERT in self.events[EV_SW] or
553 (SW_LINEOUT_INSERT in self.events[EV_SW]))))
558 if EV_ABS in self.events and axis in self.events[EV_ABS]:
559 a = self.events[EV_ABS][axis]
576 for t in self.events:
578 for c in self.events[t]: