Enum Class Terminal.Mode

java.lang.Object
java.lang.Enum<Terminal.Mode>
org.jline.terminal.Terminal.Mode
All Implemented Interfaces:
Serializable, Comparable<Terminal.Mode>, Constable
Enclosing interface:
Terminal

public static enum Terminal.Mode extends 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:
  • Enum Constant Details

    • SIXEL

      public static final Terminal.Mode SIXEL
      Sixel graphics support.

      Detected from the DA1 (Primary Device Attributes) response (CSI c / CSI ? ... c): attribute code 4 indicates 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 Details

    • values

      public static Terminal.Mode[] 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

      public static Terminal.Mode valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • mode

      public int mode()
      Returns the DEC private mode number, 0 for modes that use a custom query (e.g. KITTY_KEYBOARD), or a negative value for modes detected from the DA1 response (e.g. SIXEL).