evdev.cr
Crystal bindings to libevdev.
Documentation
As these bindings are effectively just a wrapper (i.e. minimal abstraction), behavior is identical to that described in the libevdev docs unless otherwise specified.
Installation
-
Add the dependency to your
shard.yml
:dependencies: evdev: github: nickbclifford/evdev.cr
-
Run
shards install
Usage
require "evdev"
File.open("/dev/input/event0") do |file|
device = Evdev::Device.from_file(file)
puts device.name
end
Contributing
- Fork it (https://github.com/nickbclifford/evdev.cr/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Nick Clifford - creator and maintainer