evdev: Bindings to libevdev

[ bsd3, library, system ] [ Propose Tags ]

Provides access to the Linux event device interface.


[Skip to Readme]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.0.1, 0.2.0.0, 0.2.0.1, 1.0.0.0, 1.1.0.0, 1.1.0.1, 1.2.0.0, 1.2.0.1, 1.3.0.0, 2.0.0.0, 2.0.0.1, 2.1.0, 2.2.0, 2.3.0, 2.3.1, 2.3.1.1 (info)
Change log CHANGELOG.md
Dependencies base (>=4.11 && <5), bytestring (>=0.10 && <0.12), containers (>=0.6.2 && <0.7), extra (>=1.6.18 && <1.8), filepath-bytestring (>=1.4.2 && <1.5), monad-loops (>=0.4.3 && <0.5), rawfilepath (>=1.0.0 && <1.1), time (>=1.9.3 && <1.14), unix (>=2.7.2 && <2.8) [details]
License BSD-3-Clause
Author George Thomas
Maintainer George Thomas
Revised Revision 1 made by GeorgeThomas at 2022-01-06T18:09:31Z
Category System
Home page https://github.com/georgefst/evdev
Source repo head: git clone git://github.com/georgefst/evdev.git
Uploaded by GeorgeThomas at 2021-02-12T20:40:20Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 3258 total (39 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
All reported builds failed as of 2021-08-13 [all 4 reports]

Readme for evdev-2.1.0

[back to package description]

Evdev

This library provides access to the Linux evdev interface, for reading input events from devices. It uses c2hs-generated bindings to libevdev, which should be available on almost any modern Linux distro.

It aims to expose the full set of functionality exposed by libevdev, while providing stronger types, and a higher level of abstraction - no worrying about memory management, ordering of operations etc.

For a higher-level, more functional API based on event streams, see evdev-streamly.

This package uses ByteStrings (a.k.a RawFilePaths) ubiquitously. You may want to substitute use of packages like filepath, directory, unix and process with ByteString-friendly alternatives:

Permissions

Your user will need to be a member of the input group in order to read from devices. Try usermod -a -G input [username].

To create virtual devices (i.e. to use the Evdev.UInput module) you will need permission to write to /dev/uinput. This can usually be achieved by creating a group specially for uinput permissions:

sudo groupadd uinput
sudo usermod -a -G uinput $USER
echo 'KERNEL=="uinput", GROUP="uinput", MODE:="0660", OPTIONS+="static_node=uinput"' | sudo tee -a /etc/udev/rules

Log out and back in for this to take effect.