Module com.googlecode.lanterna
Enum UnixLikeTerminal.CtrlCBehaviour
java.lang.Object
java.lang.Enum<UnixLikeTerminal.CtrlCBehaviour>
com.googlecode.lanterna.terminal.ansi.UnixLikeTerminal.CtrlCBehaviour
- All Implemented Interfaces:
Serializable
,Comparable<UnixLikeTerminal.CtrlCBehaviour>
,java.lang.constant.Constable
- Enclosing class:
UnixLikeTerminal
This enum lets you control how Lanterna will handle a ctrl+c keystroke from the user.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionPressing ctrl+c will restore the terminal and kill the application as it normally does with terminal applications.Pressing ctrl+c doesn't kill the application, it will be added to the input queue as any other key stroke -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this type with the specified name.static UnixLikeTerminal.CtrlCBehaviour[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
TRAP
Pressing ctrl+c doesn't kill the application, it will be added to the input queue as any other key stroke -
CTRL_C_KILLS_APPLICATION
Pressing ctrl+c will restore the terminal and kill the application as it normally does with terminal applications. Lanterna will restore the terminal and then callSystem.exit(1)
for this.
-
-
Constructor Details
-
CtrlCBehaviour
private CtrlCBehaviour()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-