Module com.googlecode.lanterna
Package com.googlecode.lanterna.input
Class ScreenInfoCharacterPattern
java.lang.Object
com.googlecode.lanterna.input.EscapeSequenceCharacterPattern
com.googlecode.lanterna.input.ScreenInfoCharacterPattern
- All Implemented Interfaces:
CharacterPattern
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").
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.googlecode.lanterna.input.CharacterPattern
CharacterPattern.Matching
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected KeyStroke
getKeyStrokeRaw
(char first, int num1, int num2, char last, boolean bEsc) combines the raw parts of the sequence into a KeyStroke.static ScreenInfoAction
tryToAdopt
(KeyStroke ks) Methods inherited from class com.googlecode.lanterna.input.EscapeSequenceCharacterPattern
getKeyStroke, match
-
Constructor Details
-
ScreenInfoCharacterPattern
public ScreenInfoCharacterPattern()
-
-
Method Details
-
getKeyStrokeRaw
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 classEscapeSequenceCharacterPattern
- Parameters:
first
- the char following after Esc in the sequence (either [ or O)num1
- the first decimal, or 0 if not in the sequencenum2
- the second decimal, or 0 if not in the sequencelast
- the terminating char.bEsc
- whether an extra Escape-prefix was found.- Returns:
- either null (to report mis-match), or a valid KeyStroke.
-
tryToAdopt
-