Class PosixTerminalInput
java.lang.Object
net.rubygrapefruit.platform.internal.PosixTerminalInput
- All Implemented Interfaces:
TerminalInput
Assumes vt100 input control sequences: http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns an input stream that can be used to read characters from this terminal.rawMode()Switches this terminal to raw mode.voidread(TerminalInputListener listener) Reads the next character or control keys from this terminal.reset()Resets this terminal to its default mode.booleanReturns true if this terminal supports setting raw mode.toString()
-
Constructor Details
-
PosixTerminalInput
public PosixTerminalInput()
-
-
Method Details
-
toString
-
getInputStream
Description copied from interface:TerminalInputReturns an input stream that can be used to read characters from this terminal.- Specified by:
getInputStreamin interfaceTerminalInput
-
read
Description copied from interface:TerminalInputReads the next character or control keys from this terminal. Blocks until an event is available.- Specified by:
readin interfaceTerminalInput
-
supportsRawMode
public boolean supportsRawMode()Description copied from interface:TerminalInputReturns true if this terminal supports setting raw mode.- Specified by:
supportsRawModein interfaceTerminalInput
-
rawMode
Description copied from interface:TerminalInputSwitches this terminal to raw mode. Keys are delivered as they are typed, are not echoed and are not processed.- Specified by:
rawModein interfaceTerminalInput- Throws:
NativeException- On failure, or when raw mode is not supported by this terminal.
-
reset
Description copied from interface:TerminalInputResets this terminal to its default mode.- Specified by:
resetin interfaceTerminalInput
-