enum TermBuf::Capability

Overview

What the terminal on the other end can be asked to do.

Detection fills this in; the encoder only reads it. Anything not known to be supported is treated as unsupported, so a terminal nobody recognises gets plain text rather than a screen full of escape sequences.

Defined in:

termbuf/caps/capability.cr

Enum Members

Color16 = 1_u64

The eight colours of SGR 30-37 and 40-47.

Color256 = 2_u64

The 256 colour palette, through SGR 38;5 and 48;5.

TrueColor = 4_u64

24 bit colour, through SGR 38;2 and 48;2.

BrightColors = 8_u64

The aixterm bright colour codes, SGR 90-97 and 100-107. Without this, palette indices 8 through 15 fall back to their dim counterparts, and a bright foreground picks up bold if bold is available.

Bold = 16_u64
Faint = 32_u64
Italic = 64_u64
Underline = 128_u64

SGR 4 and 24.

ExtendedUnderline = 256_u64

The 4:2 through 4:5 subparameter underline styles. Without this, every underline style degrades to a plain one.

UnderlineColor = 512_u64

SGR 58 and 59, colouring the underline separately from the text.

Blink = 1024_u64
RapidBlink = 2048_u64
Reverse = 4096_u64
Conceal = 8192_u64
Strike = 16384_u64
Overline = 32768_u64
Superscript = 65536_u64
ScrollRegion = 131072_u64

DECSTBM and the SU/SD scroll commands, which is what lets a scrolled region be moved rather than redrawn.

InsertDeleteLine = 262144_u64

IL and DL.

EraseChars = 524288_u64

ECH, erasing a run of cells without writing spaces over them.

SynchronizedOutput = 1048576_u64

DEC private mode 2026, wrapping a paint so the terminal never shows a half-drawn frame.

AltScreen = 2097152_u64

The alternate screen buffer, DEC private mode 1049.

BracketedPaste = 4194304_u64
FocusEvents = 8388608_u64
MouseSgr = 16777216_u64
KittyKeyboard = 33554432_u64
Osc8Links = 67108864_u64
KittyGraphics = 134217728_u64
KittyGraphicsTempFile = 268435456_u64
KittyColorStack = 536870912_u64
Titles = 1073741824_u64
CursorShape = 2147483648_u64
None = 0_u64
All = 4294967295_u64

Instance Method Summary

Instance Method Detail

def alt_screen? #

Returns true if this enum value contains AltScreen


[View source]
def blink? #

Returns true if this enum value contains Blink


[View source]
def bold? #

Returns true if this enum value contains Bold


[View source]
def bracketed_paste? #

Returns true if this enum value contains BracketedPaste


[View source]
def bright_colors? #

Returns true if this enum value contains BrightColors


[View source]
def color16? #

Returns true if this enum value contains Color16


[View source]
def color256? #

Returns true if this enum value contains Color256


[View source]
def conceal? #

Returns true if this enum value contains Conceal


[View source]
def cursor_shape? #

Returns true if this enum value contains CursorShape


[View source]
def erase_chars? #

Returns true if this enum value contains EraseChars


[View source]
def extended_underline? #

Returns true if this enum value contains ExtendedUnderline


[View source]
def faint? #

Returns true if this enum value contains Faint


[View source]
def focus_events? #

Returns true if this enum value contains FocusEvents


[View source]
def insert_delete_line? #

Returns true if this enum value contains InsertDeleteLine


[View source]
def italic? #

Returns true if this enum value contains Italic


[View source]
def kitty_color_stack? #

Returns true if this enum value contains KittyColorStack


[View source]
def kitty_graphics? #

Returns true if this enum value contains KittyGraphics


[View source]
def kitty_graphics_temp_file? #

Returns true if this enum value contains KittyGraphicsTempFile


[View source]
def kitty_keyboard? #

Returns true if this enum value contains KittyKeyboard


[View source]
def mouse_sgr? #

Returns true if this enum value contains MouseSgr


[View source]
def none? #

[View source]
def osc8_links? #

Returns true if this enum value contains Osc8Links


[View source]
def overline? #

Returns true if this enum value contains Overline


[View source]
def rapid_blink? #

Returns true if this enum value contains RapidBlink


[View source]
def reverse? #

Returns true if this enum value contains Reverse


[View source]
def scroll_region? #

Returns true if this enum value contains ScrollRegion


[View source]
def strike? #

Returns true if this enum value contains Strike


[View source]
def superscript? #

Returns true if this enum value contains Superscript


[View source]
def synchronized_output? #

Returns true if this enum value contains SynchronizedOutput


[View source]
def titles? #

Returns true if this enum value contains Titles


[View source]
def true_color? #

Returns true if this enum value contains TrueColor


[View source]
def underline? #

Returns true if this enum value contains Underline


[View source]
def underline_color? #

Returns true if this enum value contains UnderlineColor


[View source]