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.Keymap

Description

In KMonad we handle all releases (and some other actions) via callback mechanisms. It is the button-presses that get handled through a keymap. It is the Keymap component that manages the keymap state and ensures that incoming events are mapped to

Synopsis

Documentation

data Keymap Source #

The Keymap environment containing the current keymap

NOTE: Since the Keymap will never have to deal with anything asynchronously we can simply use IORefs here.

mkKeymap :: MonadUnliftIO m => LayerTag -> LMap Button -> ContT r m Keymap Source #

Create a Keymap but do so in the context of a ContT monad to ease nesting.

layerOp Source #

Arguments

:: HasLogFunc e 
=> Keymap

The Keymap environment

-> LayerOp

The LayerOp to perform

-> RIO e ()

The resulting action

Perform operations on the layer-stack

lookupKey Source #

Arguments

:: MonadIO m 
=> Keymap

The Keymap to lookup in

-> Keycode

The Keycode to lookup

-> m (Maybe BEnv)

The resulting action

Lookup the BEnv currently mapped to the key press.