Vty supports a configuration file format and provides a corresponding
VtyUserConfig data type. The
VtyUserConfig can be
provided to platform packages'
mkVty functions to customize
the application's use of Vty.
Debug
colorMode
Format:
colorMode "<int|FullColor>"
The preferred color mode to use, chosen from the constructors of the
ColorMode type. If absent, the backend driver may detect and
choose an appropriate color mode. Implementor's note: backend packages
should respect this setting when it is present even when their
detection indicates that a different color mode should be used.
debugLog
Format:
"debugLog" string
The value of the environment variable
VTY_DEBUG_LOG is
equivalent to a debugLog entry at the end of the last config file.
Input Processing
map
Format:
"map" term string key modifier_list
where
key := KEsc | KChar Char | KBS ... (same as Key)
modifier_list := "[" modifier+ "]"
modifier := MShift | MCtrl | MMeta | MAlt
term := "_" | string
E.g., if the contents are
map _ "\ESC[B" KUp []
map _ "\ESC[1;3B" KDown [MAlt]
map "xterm" "\ESC[D" KLeft []
Then the bytes
"\ESC[B" will result in the KUp event on all
terminals. The bytes
"\ESC[1;3B" will result in the event
KDown with the MAlt modifier on all terminals. The bytes
"\ESC[D" will result in the KLeft event when
TERM is
xterm.
If a debug log is requested then vty will output the current input
table to the log in the above format. A workflow for using this is to
set
VTY_DEBUG_LOG. Run the application. Check the debug log
for incorrect mappings. Add corrected mappings to
$HOME/.vty/config.
Unicode Character Width Maps
widthMap
Format:
"widthMap" string string
E.g.,
widthMap "xterm" "/home/user/.vty/xterm_map.dat"
This directive specifies the path to a Unicode character width map
(the second argument) that should correspond to the terminal named by
first argument. Unicode character width maps can be produced either by
running platform packages' width table tools or by calling the library
routine
buildUnicodeWidthTable. Vty platform packages should
use these configuration settings to attempt to load and install the
specified width map.