kmonad-0.4.1: Advanced keyboard remapping utility

Copyright(c) David Janssen 2019
LicenseMIT
Maintainerjanssen.dhj@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

KMonad.App.Hooks

Description

Part of the KMonad deferred-decision mechanics are implemented using hooks, which will call predicates and actions on future keypresses and/or timer events. The Hooks component is the concrete implementation of this functionality.

In the sequencing of components, this happens second, right after the Dispatch component.

Synopsis

Documentation

data Hooks Source #

The Hooks environment that is required for keeping track of all the different targets and callbacks.

mkHooks :: MonadUnliftIO m => m KeyEvent -> ContT r m Hooks Source #

Create a new Hooks environment, but as a ContT monad to avoid nesting

pull :: HasLogFunc e => Hooks -> RIO e KeyEvent Source #

Keep stepping until we succesfully get an unhandled KeyEvent

register :: HasLogFunc e => Hooks -> Hook (RIO e) -> RIO e () Source #

Insert a hook, along with the current time, into the store