Package org.jline.terminal
Enum Class Terminal.Mode
- All Implemented Interfaces:
Serializable,Comparable<Terminal.Mode>,Constable
- Enclosing interface:
Terminal
Terminal modes that JLine probes for support.
Most modes are DEC private modes probed via DECRQM
(CSI ? Pd $ p / CSI ? Pd ; Ps $ y).
Non-DEC modes such as the Kitty Keyboard Protocol and Sixel
graphics use their own detection mechanism but are probed in
the same batch and cached identically.
Support is detected at most once per terminal and the results are cached for subsequent queries.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionGrapheme cluster / Unicode Core (DEC private mode 2027).In-band window resize notifications (DEC private mode 2048).Sixel graphics support.Synchronized output (DEC private mode 2026). -
Method Summary
Modifier and TypeMethodDescriptionintmode()Returns the DEC private mode number,0for modes that use a custom query (e.g.static Terminal.ModeReturns the enum constant of this class with the specified name.static Terminal.Mode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SIXEL
Sixel graphics support.Detected from the DA1 (Primary Device Attributes) response (
CSI c/CSI ? ... c): attribute code4indicates Sixel support. No extra query is needed — the DA1 response is already read as the batch probe sentinel. -
KITTY_KEYBOARD
Kitty Keyboard Protocol.Probed via
CSI ? u; not a DEC private mode. -
SYNCHRONIZED_OUTPUT
Synchronized output (DEC private mode 2026). -
GRAPHEME_CLUSTER
Grapheme cluster / Unicode Core (DEC private mode 2027). -
IN_BAND_RESIZE
In-band window resize notifications (DEC private mode 2048).
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
mode
public int mode()Returns the DEC private mode number,0for modes that use a custom query (e.g.KITTY_KEYBOARD), or a negative value for modes detected from the DA1 response (e.g.SIXEL).
-