+######## NCURSES USER-DEFINABLE CAPABILITIES
+#
+# Extensions added after ncurses 5.0 generally use the "-x" option of tic and
+# infocmp to manipulate user-definable capabilities. Those that are intended
+# for use in either terminfo or termcap use 2-character names. Extended
+# function keys do not use 2-character names, and are available only with
+# terminfo.
+#
+# As of mid-2012, no other terminfo/termcap implementation than ncurses
+# supports this extension; termcap libraries can as noted above make limited
+# use of the feature.
+#
+# ncurses makes explicit checks for a few user-definable capabilities: AX, U8,
+# XM.
+#
+#### SCREEN Extensions:
+#
+# The screen program uses the termcap interface. It recognizes a few useful
+# nonstandard capabilities. Those are used in this file.
+#
+# AX (bool) Does understand ANSI set default fg/bg color (\E[39m /
+# \E[49m).
+# G0 (bool) Terminal can deal with ISO 2022 font selection sequences.
+# E0 (str) Switch charset 'G0' back to standard charset.
+# S0 (str) Switch charset 'G0' to the specified charset.
+# XT (bool) Terminal understands special xterm sequences (OSC, mouse
+# tracking).
+#
+# AX is relatively straightforward; it is interpreted by ncurses to say that
+# SGR 39/49 reset the terminal's foreground and background colors to their
+# "default".
+#
+# XT is harder, since screen's manpage does not give more details. For that,
+# we must read screen's source-code. When XT is set, screen assumes
+#
+# a) OSC 1 sets the title string, e.g., for the icon. Recent versions of
+# screen may also set the terminal's name, which is (for xterm) distinct
+# from the icon name.
+# b) OSC 20 sets the background pixmap. This is an rxvt feature.
+# c) OSC 39 and OSC 49 set the default foreground/background colors. Again
+# this is an rxvt feature.
+# d) certain mode settings enable the mouse: 9, 1000, 1001, 1002, 1003.
+# These are from xterm, although xterm accepts mouse codes that may not be
+# recognized by screen, e.g., 1005, 1006.
+# e) colors beyond 0..7 are implemented by xterm's aixterm-like 16-color
+# sequence. However, because screen uses only termcap, the values returned
+# by Af/Ab are not usable because they rely on expressions that termcap
+# does not support. Therefore, screen uses a hardcoded string to work
+# around the limitation.
+# f) all entries named "*xterm*" or "*rxvt*" have the bce flag set.
+#
+# The other ISO-2022 features are rarely used, but provided here to make
+# screen's termcap features available.
+#
+#### XTERM Extensions:
+#
+# Most of the xterm extensions are for function-keys. Since patch #94 (in
+# 1999), xterm has supported shift/control/alt/meta modifiers which produce
+# additional function-key strings. Some other developers copied the feature,
+# though they did not follow xterm's lead in patch #167 (in 2002), to make
+# these key definitions less ambiguous.
+#
+# A few terminals provide similar functionality (sending distinct keys when
+# a modifier is used), including rxvt.
+#
+# These are the extended keys defined in this file:
+#
+# kDC3 kDC4 kDC5 kDC6 kDC7 kDN kDN3 kDN4 kDN5 kDN6 kDN7 kEND3 kEND4 kEND5 kEND6
+# kEND7 kHOM3 kHOM4 kHOM5 kHOM6 kHOM7 kIC3 kIC4 kIC5 kIC6 kIC7 kLFT3 kLFT4
+# kLFT5 kLFT6 kLFT7 kNXT3 kNXT4 kNXT5 kNXT6 kNXT7 kPRV3 kPRV4 kPRV5 kPRV6 kPRV7
+# kRIT3 kRIT4 kRIT5 kRIT6 kRIT7 kUP kUP3 kUP4 kUP5 kUP6 kUP7 ka2 kb1 kb3 kc2
+#
+# Here are the other xterm-related extensions which are used in this file:
+#
+# Cr is a string capability which resets the cursor color
+# Cs is a string capability which sets the cursor color to a given value.
+# The single string parameter is the color name/number, according to the
+# implementation.
+# Ms modifies the selection/clipboard. Its parameters are
+# p1 = the storage unit (clipboard, selection or cut buffer)
+# p2 = the base64-encoded clipboard content.
+# Se resets the cursor style to the terminal power-on default.
+# Ss is a string capability with one numeric parameter. It is used to set the
+# cursor style as described by the DECSCUSR function to a block or
+# underline.
+# XM is a string capability which overrides ncurses's built-in string which
+# enables xterm mouse mode.
+#
+#### Miscellaneous extensions:
+#
+# gsbom/grbom are used to enable/disable real bold (not intensity bright) mode.
+# This was implemented for the Hurd.
+# E3 clears the terminal's scrollback buffer. This was implemented in the
+# Linux 3.0 kernel as a security feature. It matches a feature which was
+# added in xterm patch #107.
+# U8 is a numeric capability which denotes a terminal emulator which does not
+# support VT100 SI/SO when processing UTF-8 encoding. Set this to a nonzero
+# value to enable it.
+#