evdev provides bindings to the generic input event interface in Linux.
The evdev interface serves the purpose of passing events generated in the
kernel directly to userspace through character devices that are typically
located in /dev/input/
.
evdev also comes with bindings to uinput, the userspace input subsystem. Uinput allows userspace programs to create and handle input devices from which input events can be directly injected into the input subsystem.
- Documentation:
devel http://gvalkov.github.com/python-evdev stable http://packages.python.org/evdev - Development:
- https://github.com/gvalkov/python-evdev
- PyPi:
- http://pypi.python.org/pypi/evdev
- Enhancements:
Add
FF_*
andFF_STATUS
codes toecodes
(thanks bgilbert).Reverse event code mappings (
ecodes.{KEY,FF,REL,ABS}
and etc.) will now map to a list of codes, whenever a value corresponds to multiple codes:>>> ecodes.KEY[152] ... ['KEY_COFFEE', 'KEY_SCREENLOCK'] >>> ecodes.KEY[30] ... 'KEY_A'
- Fixes:
- Fix segfault in
device_read_many()
(thanks bgilbert).
- Fix segfault in
- Fixes:
- Raise
IOError
fromdevice_read()
anddevice_read_many()
whenread()
fails. - Several stability and style changes (thank you debian code reviewers).
- Raise
- Fixes:
- Fix vendor id and product id order in
DeviceInfo
(thanks kived).
- Fix vendor id and product id order in
- Fixes:
device.read()
will return an empty tuple if the device has nothing to offer (instead of segfaulting).- Exclude unnecessary package data in sdist and bdist.
- Enhancements:
- Add ability to set/get auto-repeat settings with
EVIOC{SG}REP
. - Add
device.version
- the value ofEVIOCGVERSION
. - Add
device.read_loop()
. - Add
device.grab()
anddevice.ungrab()
- exposesEVIOCGRAB
. - Add
device.leds
- exposesEVIOCGLED
. - Replace
DeviceInfo
class with a namedtuple.
- Add ability to set/get auto-repeat settings with
- Fixes:
device.read_one()
was dropping events.- Rename
AbsData
toAbsInfo
(as instruct input_absinfo
).
- Enhancements:
- Add the ability to set arbitrary device capabilities on uinput
devices (defaults to all
EV_KEY
ecodes). - Add
UInput.device
which is an openInputDevice
to the input device that uinput 'spawns'. - Add
UInput.capabilities()
which is just a shortcut toUInput.device.capabilities()
. - Rename
UInput.write()
toUInput.write_event()
. - Add a simpler
UInput.write(type, code, value)
method. - Make all
UInput
constructor arguments optional (default device name is nowpy-evdev-uinput
). - Add the ability to set
absmin
,absmax
,absfuzz
andabsflat
when specifying the uinput device's capabilities. - Remove the
nophys
argument - if a device fails theEVIOCGPHYS
ioctl, phys will equal the empty string. - Make
InputDevice.capabilities()
perform aEVIOCGABS
ioctl for devices that supportEV_ABS
and return that info wrapped in anAbsData
namedtuple. - Split
ioctl_devinfo
intoioctl_devinfo
andioctl_capabilities
. - Split
uinput_open()
touinput_open()
anduinput_create()
- Add more uinput usage examples and documentation.
- Rewrite uinput tests.
- Remove
mouserel
andmouseabs
fromUInput
. - Tie the sphinx version and release to the distutils version.
- Set 'methods-before-attributes' sorting in the docs.
- Add the ability to set arbitrary device capabilities on uinput
devices (defaults to all
- Fixes:
- Remove
KEY_CNT
andKEY_MAX
fromecodes.keys
.
- Remove
- Enhancements:
- Add
events.keys
, which is a combination of allBTN_
andKEY_
event codes.
- Add
- Fixes:
ecodes.c
was not generated when installing throughpip
.
Initial Release