Class ScreenInfoCharacterPattern

java.lang.Object
com.googlecode.lanterna.input.EscapeSequenceCharacterPattern
com.googlecode.lanterna.input.ScreenInfoCharacterPattern
All Implemented Interfaces:
CharacterPattern

public class ScreenInfoCharacterPattern extends EscapeSequenceCharacterPattern
This class recognizes character combinations which are actually a cursor position report. See Wikipedia's article on ANSI escape codes for more information about how cursor position reporting works ("DSR – Device Status Report").
  • Constructor Details

    • ScreenInfoCharacterPattern

      public ScreenInfoCharacterPattern()
  • Method Details

    • getKeyStrokeRaw

      protected KeyStroke getKeyStrokeRaw(char first, int num1, int num2, char last, boolean bEsc)
      Description copied from class: EscapeSequenceCharacterPattern
      combines the raw parts of the sequence into a KeyStroke. This method does not check the first char, but overrides may do so.
      Overrides:
      getKeyStrokeRaw in class EscapeSequenceCharacterPattern
      Parameters:
      first - the char following after Esc in the sequence (either [ or O)
      num1 - the first decimal, or 0 if not in the sequence
      num2 - the second decimal, or 0 if not in the sequence
      last - the terminating char.
      bEsc - whether an extra Escape-prefix was found.
      Returns:
      either null (to report mis-match), or a valid KeyStroke.
    • tryToAdopt

      public static ScreenInfoAction tryToAdopt(KeyStroke ks)