kmonad-0.4.1: Advanced keyboard remapping utility

Copyright(c) David Janssen 2019
LicenseMIT
Maintainerjanssen.dhj@gmail.com
Stabilityexperimental
Portabilitynon-portable (MPTC with FD, FFI to Linux-only c-code)
Safe HaskellNone
LanguageHaskell2010

KMonad.Keyboard.IO

Contents

Description

 
Synopsis

KeySink: send keyboard events to the OS

 

data KeySink Source #

A KeySink sends key actions to the OS

mkKeySink Source #

Arguments

:: 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

emitKey :: HasLogFunc e => KeySink -> KeyEvent -> RIO e () Source #

Emit a key to the OS

KeySource: read keyboard events from the OS

data KeySource Source #

A KeySource is an action that awaits KeyEvents from the OS

mkKeySource Source #

Arguments

:: HasLogFunc e 
=> RIO e src

Action to acquire the keysink

-> (src -> RIO e ())

Action to close the keysink

-> (src -> RIO e KeyEvent)

Action to write with the keysink

-> RIO e (Acquire KeySource) 

Create a new KeySource

awaitKey :: HasLogFunc e => KeySource -> RIO e KeyEvent Source #

Wait for the next key from the OS