Python wrapper for libevdev
Clone or download
whot Add support for LED toggles
The clib part was already mostly there, the frontend wasn't. This requires the
fd to be open in rw mode which implies buffering=0 (otherwise you get Illegal
Seek errors).

Add all this into an example for a simple LED toggle script.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Latest commit 0f33176 Aug 2, 2018

README.md

python-libevdev - Python wrapper for libevdev

This project is a Python wrapper around libevdev, taking advantage of libevdev's advanced event handling. Documentation is available here: https://python-libevdev.readthedocs.io/en/latest/

libevdev makes it easy to

  • read and parse events from an input device
  • create a virtual input device and make it send events
  • duplicate an existing device and modify the event stream

For information about libevdev see here: https://freedesktop.org/wiki/Software/libevdev/

Source code

The source code of python-libevdev can be found at: https://gitlab.freedesktop.org/libevdev/python-libevdev

License

python-libevdev is licensed under the MIT license.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: [...]

See the COPYING file for the full license information.