Safe Haskell | None |
---|---|
Language | Haskell2010 |
Functions for working with streams of input events. Unless stated otherwise, these functions will throw exceptions if the underlying C calls fail.
Synopsis
- allDevices :: (IsStream t, Monad (t IO)) => t IO Device
- allEvents :: IsStream t => t IO (Device, Event)
- makeDevices :: IsStream t => t IO RawFilePath -> t IO Device
- newDevices :: (IsStream t, Monad (t IO)) => t IO Device
- readEvents :: Device -> SerialT IO Event
- readEventsMany :: IsStream t => AsyncT IO Device -> t IO (Device, Event)
Documentation
allDevices :: (IsStream t, Monad (t IO)) => t IO Device Source #
All valid existing devices (in /dev/input). If a device can't be initialised for an individual path, then the exception is printed, and the function continues to try to initialise the others.
allEvents :: IsStream t => t IO (Device, Event) Source #
All events on all valid devices (in /dev/input). Prints any exceptions.
allEvents == readEventsMany allDevices
makeDevices :: IsStream t => t IO RawFilePath -> t IO Device Source #
Create devices for all paths in the stream.