Enum Class KeyAction
- All Implemented Interfaces:
Serializable, Comparable<KeyAction>, Constable
What happened to a key.
A held key produces one PRESS, then REPEATs for keys that repeat, then one RELEASE.
An engine that sends repeats sends them at its own rate for the keys it chooses. When an engine does not, Strata
makes them for the arrow keys, Home, End, Page Up, Page Down, Backspace and Delete only, the first 400 ms after
the press and then one every 33 ms, for the most recently pressed of those keys.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionbooleanisDown()Returns whether this is a press or a repeat: the moments when a held key should act, such as moving a caret again.static KeyActionReturns the enum constant of this class with the specified name.static KeyAction[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PRESS
The key went down. -
REPEAT
The key is still held and repeating. -
RELEASE
The key came up.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
isDown
-