=======================================================
 python-uinput - Python API to the Linux uinput-system
=======================================================

.. contents::

Description
===========

Uinput allows attaching user-space device drivers into the Linux kernel.
Python-uinput provides a simple and easy to use API to the Linux uinput-system.

General information
===================

- **Author**: `Tuomas Räsänen <http://tuos.codegrove.org/>`_ <tuos@codegrove.org>
- **Homepage**: http://codegrove.org/python-uinput/
- **License**: LGPLv3+ (see COPYING for details)
- **Version**: 0.3

Requirements
============

- Python 2.5.x+ and development files for it:

  - On Ubuntu::

      sudo apt-get install python-dev

Example usage
=============

Create and use a new uinput device with key-capabilities::

  import uinput

  device = uinput.Device()
  device.capabilities = {
      uinput.EV_KEY: (uinput.KEY_E, uinput.KEY_H, uinput.KEY_L, uinput.KEY_O),
      }

  device.emit(uinput.EV_KEY, uinput.KEY_H, 1) # Press.
  device.emit(uinput.EV_KEY, uinput.KEY_H, 0) # Release.
  device.emit(uinput.EV_KEY, uinput.KEY_E, 1)
  device.emit(uinput.EV_KEY, uinput.KEY_E, 0)
  device.emit(uinput.EV_KEY, uinput.KEY_L, 1)
  device.emit(uinput.EV_KEY, uinput.KEY_L, 0)
  device.emit(uinput.EV_KEY, uinput.KEY_L, 1)
  device.emit(uinput.EV_KEY, uinput.KEY_L, 0)
  device.emit(uinput.EV_KEY, uinput.KEY_O, 1)
  device.emit(uinput.EV_KEY, uinput.KEY_O, 0)

Downloading
===========

- Tarball is available at: http://codegrove.org/python-uinput/releases/python-uinput-0.3.tar.gz
- Latest sources from public git-repository: http://github.com/tuos/python-uinput/ ::

    git clone git://github.com/tuos/python-uinput.git

Installing
==========

The install-procedure adheres the "standard"::

  python setup build && sudo python setup install

Bug reporting
=============

Report bugs by sending email to tuos@codegrove.org or by opening an issue
at http://github.com/tuos/python-uinput/issues .
