Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Basic definitions for Key
s, Mod
ifiers, and Chord
s of Key
s and
Mod
ifiers. We can read key Chord
s from Graphics.Vty EvKey
events
using fromVty
.
This module is intended for qualified import:
import qualified Vgrep.Key as Key
We define our own Key
and Mod
types rather than using Graphics.Vty's
Key
and Modifier
, because it simplifies parsing (of keys like
Space
and Tab
, which are represented as ' '
and 't'
in
Graphics.Vty), and because a Set
of Mod
s is simpler to check for
equality than a list of Modifier
s.
Documentation
A chord of keys and modifiers pressed simultaneously.
Instances
Eq Chord Source # | |
Ord Chord Source # | |
Show Chord Source # | |
Generic Chord Source # | |
type Rep Chord Source # | |
Defined in Vgrep.Key type Rep Chord = D1 ('MetaData "Chord" "Vgrep.Key" "vgrep-0.2.3.0-79CAs1b54BVGsHizAm4Sjp" 'False) (C1 ('MetaCons "Chord" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set Mod)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Key))) |