yi-core-0.19.4: Yi editor core library

Safe Haskell | Safe-Inferred
Language | Haskell2010

Yi.Event

Contents

- Key codes

Synopsis

- data Event = Event Key [Modifier]
- prettyEvent :: Event -> String
- data Key
  - = KEsc
  - | KFun Int
  - | KPrtScr
  - | KPause
  - | KASCII Char
  - | KBS
  - | KIns
  - | KHome
  - | KPageUp
  - | KDel
  - | KEnd
  - | KPageDown
  - | KNP5
  - | KUp
  - | KMenu
  - | KLeft
  - | KDown
  - | KRight
  - | KEnter
  - | KTab
- data Modifier
  - = MShift
  - | MCtrl
  - | MMeta
  - | MSuper
  - | MHyper
- eventToChar :: Event -> Char

# Documentation

data Event Source #

Constructors

Event Key [Modifier] |

#### Instances

Instances details

Show Event Source # |
Instance details Defined in Yi.Event Methods showsPrec :: Int -> Event -> ShowS Source # show :: Event -> String Source # showList :: [Event] -> ShowS Source #
Eq Event Source # |
Instance details Defined in Yi.Event Methods (==) :: Event -> Event -> Bool Source # (/=) :: Event -> Event -> Bool Source #
Ord Event Source # |
Instance details Defined in Yi.Event Methods compare :: Event -> Event -> Ordering Source # (<) :: Event -> Event -> Bool Source # (<=) :: Event -> Event -> Bool Source # (>) :: Event -> Event -> Bool Source # (>=) :: Event -> Event -> Bool Source # max :: Event -> Event -> Event Source # min :: Event -> Event -> Event Source #

prettyEvent :: Event -> String Source #

data Key Source #

Constructors

KEsc |
KFun Int |
KPrtScr |
KPause |
KASCII Char |
KBS |
KIns |
KHome |
KPageUp |
KDel |
KEnd |
KPageDown |
KNP5 |
KUp |
KMenu |
KLeft |
KDown |
KRight |
KEnter |
KTab |

#### Instances

Instances details

Show Key Source # |
Instance details Defined in Yi.Event Methods showsPrec :: Int -> Key -> ShowS Source # show :: Key -> String Source # showList :: [Key] -> ShowS Source #
Eq Key Source # |
Instance details Defined in Yi.Event Methods (==) :: Key -> Key -> Bool Source # (/=) :: Key -> Key -> Bool Source #
Ord Key Source # |
Instance details Defined in Yi.Event Methods compare :: Key -> Key -> Ordering Source # (<) :: Key -> Key -> Bool Source # (<=) :: Key -> Key -> Bool Source # (>) :: Key -> Key -> Bool Source # (>=) :: Key -> Key -> Bool Source # max :: Key -> Key -> Key Source # min :: Key -> Key -> Key Source #

data Modifier Source #

Constructors

MShift |
MCtrl |
MMeta |
MSuper |
MHyper |

#### Instances

Instances details

Show Modifier Source # |
Instance details Defined in Yi.Event Methods showsPrec :: Int -> Modifier -> ShowS Source # show :: Modifier -> String Source # showList :: [Modifier] -> ShowS Source #
Eq Modifier Source # |
Instance details Defined in Yi.Event Methods (==) :: Modifier -> Modifier -> Bool Source # (/=) :: Modifier -> Modifier -> Bool Source #
Ord Modifier Source # |
Instance details Defined in Yi.Event Methods compare :: Modifier -> Modifier -> Ordering Source # (<) :: Modifier -> Modifier -> Bool Source # (<=) :: Modifier -> Modifier -> Bool Source # (>) :: Modifier -> Modifier -> Bool Source # (>=) :: Modifier -> Modifier -> Bool Source # max :: Modifier -> Modifier -> Modifier Source # min :: Modifier -> Modifier -> Modifier Source #

# Key codes

eventToChar :: Event -> Char Source #

Map an Event to a Char. This is used in the emacs keymap for Ctrl-Q and vim keymap `insertSpecialChar`