Home | History | Annotate | Download | only in input

Lines Matching defs:Event

28 class Event(object):
29 """An event class based on evtest constructed from an evtest event.
31 An ordinary event looks like:
32 Event: time 133082.748019, type 3 (EV_ABS), code 0 (ABS_X), value 316
34 A SYN_REPORT event looks like:
35 Event: time 10788.289613, -------------- SYN_REPORT ------------
40 """Construction of an input event.
42 @param type: the event type
43 @param code: the event code
44 @param value: the event value
54 """Convert an event string to an event object.
56 @param ev_string: an event string.
58 @returns: an event object if the event string conforms to
59 event pattern format. None otherwise.
62 # Get the pattern of an ordinary event
63 ev_pattern_time = r'Event:\s*time\s*(\d+\.\d+)'
74 # Get the pattern of the SYN_REPORT event
80 # Check if it is a SYN event.
83 return Event(EV_SYN, SYN_REPORT, 0)
85 # Check if it is a regular event.
91 return Event(ev_type, ev_code, ev_value)
93 logging.warn('not an event: %s', ev_string)
98 """Determine if the event is a SYN report event.
100 @returns: True if it is a SYN report event. False otherwise.
107 """A tuple of the event type, code, and value.
109 @returns: the tuple of the event type, code, and value.
118 @param line: an event string line.
129 """A string representation of the event.
131 @returns: a string representation of the event.
138 """An input event recorder.
148 """Construction of input event recorder.
159 self._stop_recording_thread_event = threading.Event()
189 event_number_pattern = re.compile('H: Handlers=.*event(\d*)', re.I)
196 device_node = '/dev/input/event%d' % event_number
216 ev = Event.from_string(line)
239 """Clear the event list."""
244 """Get the event list.
246 @returns: the event list.
251 SYN_EVENT = Event(EV_SYN, SYN_REPORT, 0)
252 MSC_SCAN_BTN_EVENT = {'LEFT': Event(EV_MSC, MSC_SCAN, MSC_SCAN_BTN_LEFT),
253 'RIGHT': Event(EV_MSC, MSC_SCAN, MSC_SCAN_BTN_RIGHT),
254 'MIDDLE': Event(EV_MSC, MSC_SCAN, MSC_SCAN_BTN_MIDDLE)}
286 Event: time .782950, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 9
287 Event: time .782950, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 641
288 Event: time .782950, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 268
289 Event: time .782950, type 3 (EV_ABS), code 58 (ABS_MT_PRESSURE), value 60
290 Event: time .782950, type 3 (EV_ABS), code 59 (?), value 0
291 Event: time .782950, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 88
292 Event: time .782950, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
293 Event: time .782950, type 1 (EV_KEY), code 325 (BTN_TOOL_FINGER), value 1
294 Event: time .782950, type 3 (EV_ABS), code 0 (ABS_X), value 641
295 Event: time .782950, type 3 (EV_ABS), code 1 (ABS_Y), value 268
296 Event: time .782950, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 60
297 Event: time .782950, -------------- SYN_REPORT ------------
298 Event: time .798273, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 595
299 Event: time .798273, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 288
300 Event: time .798273, type 3 (EV_ABS), code 0 (ABS_X), value 595
301 Event: time .798273, type 3 (EV_ABS), code 1 (ABS_Y), value 288
302 Event: time .798273, -------------- SYN_REPORT ------------
303 Event: time .821437, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
304 Event: time .821437, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
305 Event: time .821437, type 1 (EV_KEY), code 325 (BTN_TOOL_FINGER), value 0
306 Event: time .821437, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 0
307 Event: time .821437, -------------- SYN_REPORT ------------