vty-5.18: A simple terminal UI library

Safe HaskellSafe
LanguageHaskell2010

Graphics.Vty.Input.Terminfo

Synopsis

Documentation

classifyMapForTerm :: String -> Terminal -> ClassifyMap Source #

Queries the terminal for all capability-based input sequences and then adds on a terminal-dependent input sequence mapping.

For reference see:

Terminfo is incomplete. The vim source implies that terminfo is also incorrect. Vty assumes that the internal terminfo table added to the system-provided terminfo table is correct.

The procedure used here is:

  1. Build terminfo table for all caps. Missing caps are not added.
  2. Add tables for visible chars, esc, del, ctrl, and meta.
  3. Add internally-defined table for given terminal type.

Precedence is currently implicit in the compile algorithm.

universalTable :: ClassifyMap Source #

The key table applicable to all terminals.

Note that some of these entries are probably only applicable to ANSI/VT100 terminals.

termSpecificTables :: String -> [ClassifyMap] Source #

Tables specific to a given terminal that are not derivable from terminfo.

Note that this adds the ANSIVT100VT50 tables regardless of term identifier.

visibleChars :: ClassifyMap Source #

Visible characters in the ISO-8859-1 and UTF-8 common set.

We limit to < 0xC1. The UTF8 sequence detector will catch all values 0xC2 and above before this classify table is reached.

ctrlChars :: ClassifyMap Source #

Non-printable characters in the ISO-8859-1 and UTF-8 common set translated to ctrl + char.

This treats CTRL-i the same as tab.

specialSupportKeys :: ClassifyMap Source #

Esc, meta-esc, delete, meta-delete, enter, meta-enter.

keysFromCapsTable :: ClassifyMap Source #

A classification table directly generated from terminfo cap strings. These are:

  • ka1 - keypad up-left
  • ka3 - keypad up-right
  • kb2 - keypad center
  • kbs - keypad backspace
  • kbeg - begin
  • kcbt - back tab
  • kc1 - keypad left-down
  • kc3 - keypad right-down
  • kdch1 - delete
  • kcud1 - down
  • kend - end
  • kent - enter
  • kf0 - kf63 - function keys
  • khome - KHome
  • kich1 - insert
  • kcub1 - left
  • knp - next page (page down)
  • kpp - previous page (page up)
  • kcuf1 - right
  • kDC - shift delete
  • kEND - shift end
  • kHOM - shift home
  • kIC - shift insert
  • kLFT - shift left
  • kRIT - shift right
  • kcuu1 - up

functionKeyCapsTable :: ClassifyMap Source #

Cap names for function keys.