- java.lang.Object
-
- java.lang.Enum<Terminal.Mode>
-
- org.jline.terminal.Terminal.Mode
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<Terminal.Mode>
- Enclosing interface:
- Terminal
public static enum Terminal.Mode extends java.lang.Enum<Terminal.Mode>
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:
Terminal.isModeSupported(Mode)
-
-
Enum Constant Summary
Enum Constants Enum Constant Description GRAPHEME_CLUSTERGrapheme cluster / Unicode Core (DEC private mode 2027).IN_BAND_RESIZEIn-band window resize notifications (DEC private mode 2048).KITTY_KEYBOARDSIXELSixel graphics support.SYNCHRONIZED_OUTPUTSynchronized output (DEC private mode 2026).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intmode()Returns the DEC private mode number,0for modes that use a custom query (e.g.static Terminal.ModevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static Terminal.Mode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SIXEL
public static final Terminal.Mode 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
public static final Terminal.Mode KITTY_KEYBOARD
Kitty Keyboard Protocol.Probed via
CSI ? u; not a DEC private mode.
-
SYNCHRONIZED_OUTPUT
public static final Terminal.Mode SYNCHRONIZED_OUTPUT
Synchronized output (DEC private mode 2026).
-
GRAPHEME_CLUSTER
public static final Terminal.Mode GRAPHEME_CLUSTER
Grapheme cluster / Unicode Core (DEC private mode 2027).
-
IN_BAND_RESIZE
public static final Terminal.Mode IN_BAND_RESIZE
In-band window resize notifications (DEC private mode 2048).
-
-
Method Detail
-
values
public static Terminal.Mode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Terminal.Mode c : Terminal.Mode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Terminal.Mode valueOf(java.lang.String name)
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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- 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).
-
-