kmonad-0.4.2: Advanced keyboard remapping utility
Safe HaskellSafe-Inferred
LanguageHaskell2010

KMonad.Keyboard.Types

Synopsis

Documentation

data Switch Source #

KMonad recognizes 2 different types of actions: presses and releases. Note that we do not handle repeat events at all.

Constructors

Press 
Release 

Instances

Instances details
Enum Switch Source # 
Instance details

Defined in KMonad.Keyboard.Types

Generic Switch Source # 
Instance details

Defined in KMonad.Keyboard.Types

Associated Types

type Rep Switch :: Type -> Type #

Methods

from :: Switch -> Rep Switch x #

to :: Rep Switch x -> Switch #

Show Switch Source # 
Instance details

Defined in KMonad.Keyboard.Types

Eq Switch Source # 
Instance details

Defined in KMonad.Keyboard.Types

Methods

(==) :: Switch -> Switch -> Bool #

(/=) :: Switch -> Switch -> Bool #

Ord Switch Source # 
Instance details

Defined in KMonad.Keyboard.Types

Hashable Switch Source # 
Instance details

Defined in KMonad.Keyboard.Types

Methods

hashWithSalt :: Int -> Switch -> Int #

hash :: Switch -> Int #

type Rep Switch Source # 
Instance details

Defined in KMonad.Keyboard.Types

type Rep Switch = D1 ('MetaData "Switch" "KMonad.Keyboard.Types" "kmonad-0.4.2-inplace" 'False) (C1 ('MetaCons "Press" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Release" 'PrefixI 'False) (U1 :: Type -> Type))

data KeyEvent Source #

An KeyEvent is a Switch on a particular Keycode

Instances

Instances details
Generic KeyEvent Source # 
Instance details

Defined in KMonad.Keyboard.Types

Associated Types

type Rep KeyEvent :: Type -> Type #

Methods

from :: KeyEvent -> Rep KeyEvent x #

to :: Rep KeyEvent x -> KeyEvent #

Show KeyEvent Source # 
Instance details

Defined in KMonad.Keyboard.Types

Eq KeyEvent Source # 
Instance details

Defined in KMonad.Keyboard.Types

Ord KeyEvent Source #

An Ord instance, where Press > Release, and otherwise we Ord on the Keycode

Instance details

Defined in KMonad.Keyboard.Types

Hashable KeyEvent Source # 
Instance details

Defined in KMonad.Keyboard.Types

Methods

hashWithSalt :: Int -> KeyEvent -> Int #

hash :: KeyEvent -> Int #

HasKeyEvent KeyEvent Source # 
Instance details

Defined in KMonad.Keyboard.Types

Display KeyEvent Source #

A Display instance for KeyEvents that prints them out nicely.

Instance details

Defined in KMonad.Keyboard.Types

type Rep KeyEvent Source # 
Instance details

Defined in KMonad.Keyboard.Types

type Rep KeyEvent = D1 ('MetaData "KeyEvent" "KMonad.Keyboard.Types" "kmonad-0.4.2-inplace" 'False) (C1 ('MetaCons "KeyEvent" 'PrefixI 'True) (S1 ('MetaSel ('Just "_switch") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Switch) :*: S1 ('MetaSel ('Just "_keycode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Keycode)))

mkKeyEvent :: Switch -> Keycode -> KeyEvent Source #

Create a new KeyEvent from a Switch and a Keycode

type KeyPred = KeyEvent -> Bool Source #

Predicate on KeyEvent's

type LayerTag = Text Source #

Layers are identified by a tag that is simply a Text value.

type LMap a = LayerStack LayerTag Keycode a Source #

LMaps are mappings from LayerTagd maps from Keycode to things.