jline.console
Enum Key

java.lang.Object
  extended by java.lang.Enum<Key>
      extended by jline.console.Key
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Key>

public enum Key
extends java.lang.Enum<Key>

Map from key name to key codes.

Since:
2.0
Author:
Marc Prud'hommeaux, Jason Dillon
See Also:
KeyEvent

Enum Constant Summary
BACKSPACE
           
CTRL_A
           
CTRL_B
           
CTRL_C
           
CTRL_D
           
CTRL_E
           
CTRL_F
           
CTRL_G
           
CTRL_K
           
CTRL_L
           
CTRL_N
           
CTRL_OB
           
CTRL_P
           
CTRL_QM
           
DELETE
           
 
Field Summary
 short code
           
 
Method Summary
static Key valueOf(int code)
           
static Key valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Key[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CTRL_A

public static final Key CTRL_A

CTRL_B

public static final Key CTRL_B

CTRL_C

public static final Key CTRL_C

CTRL_D

public static final Key CTRL_D

CTRL_E

public static final Key CTRL_E

CTRL_F

public static final Key CTRL_F

CTRL_G

public static final Key CTRL_G

CTRL_K

public static final Key CTRL_K

CTRL_L

public static final Key CTRL_L

CTRL_N

public static final Key CTRL_N

CTRL_P

public static final Key CTRL_P

CTRL_OB

public static final Key CTRL_OB

CTRL_QM

public static final Key CTRL_QM

BACKSPACE

public static final Key BACKSPACE

DELETE

public static final Key DELETE
Field Detail

code

public final short code
Method Detail

values

public static Key[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Key c : Key.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Key valueOf(java.lang.String name)
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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

valueOf

public static Key valueOf(int code)