Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Key
- data Modifier
- data Event
- = EvKey Key [Modifier]
- | EvMouseDown Int Int Button [Modifier]
- | EvMouseUp Int Int (Maybe Button)
- | EvResize Int Int
- | EvPaste ByteString
- | EvLostFocus
- | EvGainedFocus
- data Button
- = BLeft
- | BMiddle
- | BRight
- | BScrollUp
- | BScrollDown
- type ClassifyMap = [(String, Event)]
- data InternalEvent
Documentation
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.
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
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.
Instances
Generic Modifier Source # | |
Read Modifier Source # | |
Show Modifier Source # | |
NFData Modifier Source # | |
Defined in Graphics.Vty.Input.Events | |
Eq Modifier Source # | |
Ord Modifier Source # | |
Defined in Graphics.Vty.Input.Events | |
type Rep Modifier Source # | |
Defined in Graphics.Vty.Input.Events type Rep Modifier = D1 ('MetaData "Modifier" "Graphics.Vty.Input.Events" "vty-6.1-3Abw7VxkSUPE4N7JCXIsbj" 'False) ((C1 ('MetaCons "MShift" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MCtrl" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MMeta" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MAlt" 'PrefixI 'False) (U1 :: Type -> Type))) |
Events.
EvKey Key [Modifier] | A keyboard key was pressed with the specified modifiers. |
EvMouseDown Int Int Button [Modifier] | A mouse button was pressed at the specified column and row. Any modifiers available in the event are also provided. |
EvMouseUp Int Int (Maybe Button) | A mouse button was released at the specified column and row. Some terminals report only that a button was released without specifying which one; in that case, Nothing is provided. Otherwise Just the button released is included in the event. |
EvResize Int Int | |
EvPaste ByteString | A paste event occurs when a bracketed paste input sequence is received. For terminals that support bracketed paste mode, these events will be triggered on a paste event. Terminals that do not support bracketed pastes will send the paste contents as ordinary input (which is probably bad, so beware!) Note that the data is provided in raw form and you'll have to decode (e.g. as UTF-8) if that's what your application expects. |
EvLostFocus | The terminal running the application lost input focus. |
EvGainedFocus | The terminal running the application gained input focus. |
Instances
Mouse buttons.
Instances
Generic Button Source # | |
Read Button Source # | |
Show Button Source # | |
NFData Button Source # | |
Defined in Graphics.Vty.Input.Events | |
Eq Button Source # | |
Ord Button Source # | |
type Rep Button Source # | |
Defined in Graphics.Vty.Input.Events type Rep Button = D1 ('MetaData "Button" "Graphics.Vty.Input.Events" "vty-6.1-3Abw7VxkSUPE4N7JCXIsbj" 'False) ((C1 ('MetaCons "BLeft" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BMiddle" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "BRight" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BScrollUp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BScrollDown" 'PrefixI 'False) (U1 :: Type -> Type)))) |
type ClassifyMap = [(String, Event)] Source #
data InternalEvent Source #
The type of internal events that drive the internal Vty event dispatching to the application.
ResumeAfterInterrupt | Vty resumed operation after the process was interrupted (e.g. with a signal). In practice this translates into a screen redraw in the input event loop. |
InputEvent Event | An input event was received. |