vty-5.4.0: A simple terminal UI library

Safe Haskell | Safe
Language | Haskell2010

Graphics.Vty.Input.Events

Synopsis

- data Key
  - = KEsc
  - | KChar Char
  - | KBS
  - | KEnter
  - | KLeft
  - | KRight
  - | KUp
  - | KDown
  - | KUpLeft
  - | KUpRight
  - | KDownLeft
  - | KDownRight
  - | KCenter
  - | KFun Int
  - | KBackTab
  - | KPrtScr
  - | KPause
  - | KIns
  - | KHome
  - | KPageUp
  - | KDel
  - | KEnd
  - | KPageDown
  - | KBegin
  - | KMenu
- data Modifier
  - = MShift
  - | MCtrl
  - | MMeta
  - | MAlt
- data Button
  - = BLeft
  - | BMiddle
  - | BRight
- data Event
  - = EvKey Key [Modifier]
  - | EvMouse Int Int Button [Modifier]
  - | EvResize Int Int
- type ClassifyMap = [(String, Event)]

# Documentation

data Key Source

Representations of non-modifier keys.

- KFun is indexed from 0 to 63. Range of supported FKeys varies by terminal and keyboard.
- KUpLeft, KUpRight, KDownLeft, KDownRight, KCenter support varies by terminal and keyboard.
- Actually, support for most of these but KEsc, KChar, KBS, and KEnter vary by terminal and keyboard.

Constructors

KEsc |
KChar Char |
KBS |
KEnter |
KLeft |
KRight |
KUp |
KDown |
KUpLeft |
KUpRight |
KDownLeft |
KDownRight |
KCenter |
KFun Int |
KBackTab |
KPrtScr |
KPause |
KIns |
KHome |
KPageUp |
KDel |
KEnd |
KPageDown |
KBegin |
KMenu |

Instances

Eq Key Source |
Ord Key Source |
Read Key Source |
Show Key Source |

data Modifier Source

Modifier keys. Key codes are interpreted such that users are more likely to have Meta than Alt; for instance on the PC Linux console, `MMeta` will generally correspond to the physical Alt key.

Constructors

MShift |
MCtrl |
MMeta |
MAlt |

Instances

Eq Modifier Source |
Ord Modifier Source |
Read Modifier Source |
Show Modifier Source |

data Button Source

Mouse buttons.

todo not supported.

Constructors

BLeft |
BMiddle |
BRight |

Instances

Eq Button Source |
Ord Button Source |
Show Button Source |

data Event Source

Events.

Constructors

EvKey Key [Modifier] |
EvMouse Int Int Button [Modifier] | todo mouse events are not supported
EvResize Int Int | if read from `eventChannel` this is the size at the time of the signal. If read from `nextEvent` this is the size at the time the event was processed by Vty. Typically these are the same, but if somebody is resizing the terminal quickly they can be different.

Instances

Eq Event Source |
Ord Event Source |
Show Event Source |

type ClassifyMap = [(String, Event)] Source