| |
|
| java.lang.Object jline.Terminal jline.WindowsTerminal
WindowsTerminal | public class WindowsTerminal extends Terminal (Code) | |
Terminal implementation for Microsoft Windows. Terminal initialization in
WindowsTerminal.initializeTerminal is accomplished by extracting the
jline_version.dll, saving it to the system temporary
directoy (determined by the setting of the java.io.tmpdir System
property), loading the library, and then calling the Win32 APIs SetConsoleMode and
GetConsoleMode to
disable character echoing.
By default, the
WindowsTerminal.readCharacter method will attempt to test to see if
the specified
InputStream is
System.in or a wrapper around
FileDescriptor.in , and if so, will bypass the character reading to
directly invoke the readc() method in the JNI library. This is so the class
can read special keys (like arrow keys) which are otherwise inaccessible via
the
System.in stream. Using JNI reading can be bypassed by setting
the jline.WindowsTerminal.disableDirectConsole system property
to true .
author: Marc Prud'hommeaux |
Inner Class :static class ReplayPrefixOneCharInputStream extends InputStream | |
Field Summary | |
final public static int | DELETE_KEY When following the SPECIAL_KEY_INDICATOR or NUMPAD_KEY_INDICATOR
this character indicates that
the delete key was pressed. | final public static int | DOWN_ARROW_KEY When following the SPECIAL_KEY_INDICATOR or NUMPAD_KEY_INDICATOR
this character indicates an
down arrow key press. | final public static char | END_KEY When following the SPECIAL_KEY_INDICATOR or NUMPAD_KEY_INDICATOR
this character indicates that
the end key was pressed. | final public static char | ESCAPE_KEY When following the SPECIAL_KEY_INDICATOR or NUMPAD_KEY_INDICATOR,
this character indicates that the escape key was pressed. | final public static int | HOME_KEY When following the SPECIAL_KEY_INDICATOR or NUMPAD_KEY_INDICATOR
this character indicates that
the home key was pressed. | final public static char | INSERT_KEY When following the SPECIAL_KEY_INDICATOR or NUMPAD_KEY_INDICATOR
this character indicates that
the insert key was pressed. | final public static int | LEFT_ARROW_KEY When following the SPECIAL_KEY_INDICATOR or NUMPAD_KEY_INDICATOR,
this character indicates an left arrow key press. | final public static int | NUMPAD_KEY_INDICATOR On windows terminals, this character indicates that a special key on the
number pad has been pressed. | final public static char | PAGE_DOWN_KEY When following the SPECIAL_KEY_INDICATOR or NUMPAD_KEY_INDICATOR
this character indicates that
the page down key was pressed. | final public static char | PAGE_UP_KEY When following the SPECIAL_KEY_INDICATOR or NUMPAD_KEY_INDICATOR
this character indicates that
the page up key was pressed. | final public static int | RIGHT_ARROW_KEY When following the SPECIAL_KEY_INDICATOR or NUMPAD_KEY_INDICATOR
this character indicates an
right arrow key press. | final public static int | SPECIAL_KEY_INDICATOR On windows terminals, this character indicates that a 'special' key has
been pressed. | final public static int | UP_ARROW_KEY When following the SPECIAL_KEY_INDICATOR or NUMPAD_KEY_INDICATOR
this character indicates an up
arrow key press. | String | encoding | InputStreamReader | replayReader | ReplayPrefixOneCharInputStream | replayStream |
DELETE_KEY | final public static int DELETE_KEY(Code) | | When following the SPECIAL_KEY_INDICATOR or NUMPAD_KEY_INDICATOR
this character indicates that
the delete key was pressed.
|
DOWN_ARROW_KEY | final public static int DOWN_ARROW_KEY(Code) | | When following the SPECIAL_KEY_INDICATOR or NUMPAD_KEY_INDICATOR
this character indicates an
down arrow key press.
|
END_KEY | final public static char END_KEY(Code) | | When following the SPECIAL_KEY_INDICATOR or NUMPAD_KEY_INDICATOR
this character indicates that
the end key was pressed.
|
ESCAPE_KEY | final public static char ESCAPE_KEY(Code) | | When following the SPECIAL_KEY_INDICATOR or NUMPAD_KEY_INDICATOR,
this character indicates that the escape key was pressed.
|
HOME_KEY | final public static int HOME_KEY(Code) | | When following the SPECIAL_KEY_INDICATOR or NUMPAD_KEY_INDICATOR
this character indicates that
the home key was pressed.
|
INSERT_KEY | final public static char INSERT_KEY(Code) | | When following the SPECIAL_KEY_INDICATOR or NUMPAD_KEY_INDICATOR
this character indicates that
the insert key was pressed.
|
LEFT_ARROW_KEY | final public static int LEFT_ARROW_KEY(Code) | | When following the SPECIAL_KEY_INDICATOR or NUMPAD_KEY_INDICATOR,
this character indicates an left arrow key press.
|
NUMPAD_KEY_INDICATOR | final public static int NUMPAD_KEY_INDICATOR(Code) | | On windows terminals, this character indicates that a special key on the
number pad has been pressed.
|
PAGE_DOWN_KEY | final public static char PAGE_DOWN_KEY(Code) | | When following the SPECIAL_KEY_INDICATOR or NUMPAD_KEY_INDICATOR
this character indicates that
the page down key was pressed.
|
PAGE_UP_KEY | final public static char PAGE_UP_KEY(Code) | | When following the SPECIAL_KEY_INDICATOR or NUMPAD_KEY_INDICATOR
this character indicates that
the page up key was pressed.
|
RIGHT_ARROW_KEY | final public static int RIGHT_ARROW_KEY(Code) | | When following the SPECIAL_KEY_INDICATOR or NUMPAD_KEY_INDICATOR
this character indicates an
right arrow key press.
|
SPECIAL_KEY_INDICATOR | final public static int SPECIAL_KEY_INDICATOR(Code) | | On windows terminals, this character indicates that a 'special' key has
been pressed. This means that a key such as an arrow key, or delete, or
home, etc. will be indicated by the next character.
|
UP_ARROW_KEY | final public static int UP_ARROW_KEY(Code) | | When following the SPECIAL_KEY_INDICATOR or NUMPAD_KEY_INDICATOR
this character indicates an up
arrow key press.
|
replayStream | ReplayPrefixOneCharInputStream replayStream(Code) | | |
WindowsTerminal | public WindowsTerminal()(Code) | | |
disableEcho | public synchronized void disableEcho()(Code) | | |
enableEcho | public synchronized void enableEcho()(Code) | | |
getDirectConsole | public Boolean getDirectConsole()(Code) | | Whether or not to allow the use of the JNI console interaction.
|
getEcho | public boolean getEcho()(Code) | | |
isANSISupported | public boolean isANSISupported()(Code) | | Windows doesn't support ANSI codes by default; disable them.
|
isEchoEnabled | public synchronized boolean isEchoEnabled()(Code) | | |
isSupported | public boolean isSupported()(Code) | | |
setDirectConsole | public void setDirectConsole(Boolean directConsole)(Code) | | Whether or not to allow the use of the JNI console interaction.
|
|
|
|