1module Graphics.Vty.Input.Events where
3-- | Representations of non-modifier keys.
5-- * KFun is indexed from 0 to 63. Range of supported FKeys varies by terminal and keyboard.
7-- * KUpLeft, KUpRight, KDownLeft, KDownRight, KCenter support varies by terminal and keyboard.
9-- * Actually, support for most of these but KEsc, KChar, KBS, and KEnter vary by terminal and
11data Key = KEsc | KChar Char | KBS | KEnter
12 | KLeft | KRight | KUp | KDown
13 | KUpLeft | KUpRight | KDownLeft | KDownRight | KCenter
14 | KFun Int | KBackTab | KPrtScr | KPause | KIns
15 | KHome | KPageUp | KDel | KEnd | KPageDown | KBegin | KMenu
16 deriving (Eq,Show,Ord)
18-- | Modifier keys. Key codes are interpreted such that users are more likely to
19-- have Meta than Alt; for instance on the PC Linux console, 'MMeta' will
20-- generally correspond to the physical Alt key.
21data Modifier = MShift | MCtrl | MMeta | MAlt
22 deriving (Eq,Show,Ord)
26-- \todo not supported.
27data Button = BLeft | BMiddle | BRight
28 deriving (Eq,Show,Ord)
32 = EvKey Key [Modifier]
33 -- | \todo mouse events are not supported
34 | EvMouse Int Int Button [Modifier]
35 -- | if read from 'event_channel' this is the size at the time of the signal. If read from
36 -- 'next_event' this is the size at the time the event was processed by Vty. Typically these are
37 -- the same, but if somebody is resizing the terminal quickly they can be different.
39 deriving (Eq,Show,Ord)
41-- | representation of mapping from input bytes to event
42type ClassifyTable = [(String, Event)]
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list