Copyright | (c) David Janssen 2019 |
---|---|
License | MIT |
Maintainer | janssen.dhj@gmail.com |
Stability | experimental |
Portability | non-portable (MPTC with FD, FFI to Linux-only c-code) |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- data KeySink
- mkKeySink :: HasLogFunc e => RIO e snk -> (snk -> RIO e ()) -> (snk -> KeyEvent -> RIO e ()) -> RIO e (Acquire KeySink)
- emitKey :: HasLogFunc e => KeySink -> KeyEvent -> RIO e ()
- data KeySource
- mkKeySource :: HasLogFunc e => RIO e src -> (src -> RIO e ()) -> (src -> RIO e KeyEvent) -> RIO e (Acquire KeySource)
- awaitKey :: HasLogFunc e => KeySource -> RIO e KeyEvent
KeySink: send keyboard events to the OS
:: HasLogFunc e | |
=> RIO e snk | Action to acquire the keysink |
-> (snk -> RIO e ()) | Action to close the keysink |
-> (snk -> KeyEvent -> RIO e ()) | Action to write with the keysink |
-> RIO e (Acquire KeySink) |
Create a new KeySink