Lines Matching refs:device
13 """ Read properties and events of a linux input device. """
95 Linux evdev input device
97 A linux kernel "evdev" device sends a stream of "input events".
102 A given input device supports a subset of the possible types, and for
105 The device maintains a "valuator" for each supported type/code pairs.
120 In each input report, the device sends an unordered list of all
127 The device maintains a list of slots, where each slot contains a
128 single contact. In each input report, the device only sends
145 Constructor opens the device file and probes its properties.
147 Note: The device file is left open when the constructor exits.
154 # Open the device node, and use ioctls to probe its properties
166 Deconstructor closes the device file, if it is open.
180 Events not supported by this device are silently ignored.
204 """ Queries device file for version information. """
213 """ Queries device file for input device identification. """
223 """ Queries device file for the device name. """
224 # Device name is a C-string up to 255 bytes in length.
232 Queries device file for current value of all switches and returns
242 Queries device file for absinfo structure for given absolute axis.
251 Queries device file for supported event codes for given event type.
275 """ Queries device file for supported event types. """
318 Sets up the device's mt_slots array.
377 tracking_id (> -1). It is used to make an MT-B device look like
378 single-touch (ST) device.
566 print ('Input device ID: bus %x vendor %x product %x version %x' %
568 print 'Input device name: "%s"' % (self.name)
599 def print_report(device):
601 if device.is_touchpad():
602 f = device.get_num_fingers()
605 x = device.get_x()
606 y = device.get_y()
607 z = device.get_pressure()
608 l = device.get_left()
610 if device.is_mt():
611 device.print_slots()
624 help="device path (/dev/input/event0)")
628 default=False, help="Find and use first touchpad device")
635 device = InputDevice(path)
636 if device.is_touchpad():
639 devices.append(device)
646 device = InputDevice(path)
647 if device.is_audio_jack():
648 devices.append(device)
649 device = None
657 for device in devices:
658 device.print_props()
659 if device.is_touchpad():
661 (device.get_x_min(), device.get_x_max(),
662 device.get_y_min(), device.get_y_max(),
663 device.get_pressure_min(), device.get_pressure_max()))
664 device.print_slots()
665 print 'Number of fingers: %d' % device.get_num_fingers()
666 print 'Current slot id: %d' % device.get_current_slot_id()
674 # Lookup for the device which owns fd.
675 device = [d for d in devices if d.f == fd][0]
680 is_syn = device.process_event(ev)
683 print_report(device)