Enum Device.TerminalType
- All Implemented Interfaces:
Serializable,Comparable<Device.TerminalType>,java.lang.constant.Constable
- Enclosing interface:
Device
Each terminal type includes:
- An identifier string
- Supported OSC codes
- Default/native color depth
- Whether CSI ? 996 n theme DSR queries are supported
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAlacritty - GPU-accelerated terminalApple TerminalConEmu/Cmder - Windows console emulatorContour - Modern terminal emulator.Extraterm - Electron-based terminalFoot - Fast, lightweight Wayland terminal (VTE-based, supports CSI ?Ghostty - Fast GPU-accelerated terminal, uses Kitty graphics protocol.GNOME Terminal and other VTE-based terminals.Hyper - Electron-based terminaliTerm2JetBrains IDEs (IntelliJ, etc.) using JediTermKitty terminal - GPU-accelerated, uses Kitty graphics protocol.Konsole - KDE terminal emulatorLinux console (no OSC query support)Mintty - Default terminal for Git Bash, Cygwin, MSYS2Rio - Hardware-accelerated GPU terminalrxvt and urxvtGNU Screen - Terminal multiplexer (no OSC passthrough by default)Terminus/Tabby - Electron-based terminaltmux - Terminal multiplexer.Unknown terminal - assume basic supportVisual Studio Code integrated terminalWarp - Modern terminal with AI featuresWave - Modern terminalWezTerm - GPU-accelerated terminal with multiplexingWindows Terminalxterm and compatible -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if this terminal type is expected to support mouse input.booleanCheck if this terminal type is expected to support Sixel graphics.Get the default/native color depth for this terminal type.Get the expected DA1 features for this terminal type.booleansupports(Device.OscCode code) booleanCheck if this terminal supports Mode 2027 (grapheme cluster segmentation).booleanCheck if this terminal supports OSC 8 hyperlinks.booleanCheck if this terminal supports OSC 133 shell integration.booleanCheck if this terminal supports Mode 2026 (synchronized output).booleanCheck if this terminal supports the CSI ?booleanCheck if this terminal natively supports true color (24-bit).static Device.TerminalTypeReturns the enum constant of this type with the specified name.static Device.TerminalType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
JETBRAINS
JetBrains IDEs (IntelliJ, etc.) using JediTerm -
VSCODE
Visual Studio Code integrated terminal -
APPLE_TERMINAL
Apple Terminal -
ITERM2
iTerm2 -
KITTY
Kitty terminal - GPU-accelerated, uses Kitty graphics protocol. Supports CSI ? 996 n since 0.38.1. -
GHOSTTY
Ghostty - Fast GPU-accelerated terminal, uses Kitty graphics protocol. Supports CSI ? 996 n since 1.0.0. -
ALACRITTY
Alacritty - GPU-accelerated terminal -
WEZTERM
WezTerm - GPU-accelerated terminal with multiplexing -
FOOT
Foot - Fast, lightweight Wayland terminal (VTE-based, supports CSI ? 996 n) -
CONTOUR
Contour - Modern terminal emulator. Origin of the CSI ? 996 n extension since 0.4.0. -
RIO
Rio - Hardware-accelerated GPU terminal -
WARP
Warp - Modern terminal with AI features -
WAVE
Wave - Modern terminal -
HYPER
Hyper - Electron-based terminal -
TABBY
Terminus/Tabby - Electron-based terminal -
EXTRATERM
Extraterm - Electron-based terminal -
GNOME_TERMINAL
GNOME Terminal and other VTE-based terminals. Supports CSI ? 996 n since VTE 0.82.0. -
KONSOLE
Konsole - KDE terminal emulator -
RXVT
rxvt and urxvt -
WINDOWS_TERMINAL
Windows Terminal -
MINTTY
Mintty - Default terminal for Git Bash, Cygwin, MSYS2 -
CONEMU
ConEmu/Cmder - Windows console emulator -
TMUX
tmux - Terminal multiplexer. Supports CSI ? 996 n passthrough. -
SCREEN
GNU Screen - Terminal multiplexer (no OSC passthrough by default) -
XTERM
xterm and compatible -
LINUX_CONSOLE
Linux console (no OSC query support) -
UNKNOWN
Unknown terminal - assume basic support
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getIdentifier
-
getSupportedCodes
-
supports
-
getDefaultColorDepth
Get the default/native color depth for this terminal type.This is the terminal's native capability. The actual color depth may be different depending on TERM/COLORTERM settings.
- Returns:
- the default color depth
-
supportsTrueColor
public boolean supportsTrueColor()Check if this terminal natively supports true color (24-bit).- Returns:
- true if the terminal supports true color
-
supportsThemeDsr
public boolean supportsThemeDsr()Check if this terminal supports the CSI ? 996 n theme mode DSR query.When supported, the terminal can be queried for its current dark/light mode preference using
CSI ? 996 n, and responds withCSI ? 997 ; 1 n(dark) orCSI ? 997 ; 2 n(light).Additionally, unsolicited notifications can be enabled with
CSI ? 2031 hso the terminal reports theme changes automatically.Ref: Contour VT extension
- Returns:
- true if CSI ? 996 n theme DSR is supported
-
supportsGraphemeClusterMode
public boolean supportsGraphemeClusterMode()Check if this terminal supports Mode 2027 (grapheme cluster segmentation).Mode 2027 tells the terminal to use UAX #29 grapheme cluster segmentation instead of per-codepoint wcwidth for cursor positioning. This is needed for correct handling of multi-codepoint characters like ZWJ emoji sequences, flag emoji, and combining characters.
Known supporting terminals: Ghostty, WezTerm, Kitty, Contour, Foot.
- Returns:
- true if Mode 2027 is expected to be supported
-
supportsSynchronizedOutput
public boolean supportsSynchronizedOutput()Check if this terminal supports Mode 2026 (synchronized output).Synchronized output prevents screen tearing during rapid terminal redraws by buffering rendering until the mode is disabled.
Known supporting terminals: Kitty, Ghostty, WezTerm, Foot, Contour, iTerm2, Mintty.
- Returns:
- true if Mode 2026 is expected to be supported
-
supportsShellIntegration
public boolean supportsShellIntegration()Check if this terminal supports OSC 133 shell integration.OSC 133 marks semantic zones in terminal output (prompt, user input, command output) enabling features like click-to-scroll-to-prompt, command output selection, and visual prompt highlighting.
Known supporting terminals: iTerm2, Kitty, Ghostty, WezTerm, Foot, Contour, VS Code, Windows Terminal, GNOME Terminal (VTE 0.70+), Konsole (22.04+).
- Returns:
- true if OSC 133 shell integration is expected to be supported
-
supportsHyperlinks
public boolean supportsHyperlinks()Check if this terminal supports OSC 8 hyperlinks.- Returns:
- true if OSC 8 hyperlinks are supported
-
getExpectedFeatures
Get the expected DA1 features for this terminal type.This returns the features that this terminal type is expected to report when queried via DA1. This can be used to validate DA1 responses or to infer capabilities without querying.
Note: Actual features may vary based on terminal version and configuration.
- Returns:
- set of expected features, never null
-
expectsSixel
public boolean expectsSixel()Check if this terminal type is expected to support Sixel graphics.- Returns:
- true if Sixel is expected to be supported
-
expectsMouse
public boolean expectsMouse()Check if this terminal type is expected to support mouse input.- Returns:
- true if mouse support is expected
-