The key pressed event is using TYPE_PRESSED type, while the key
released event is using TYPE_RELEASED type.
Keypad, FunctionData
| Modifier and Type | Field and Description |
|---|---|
| public static final String | FIELD_KEY_CODE
Represents the key code field name. |
| public static final String | FIELD_KEY_NAME
Represents the key name field name. |
| public static final String | FIELD_SUB_TYPE
Represents the event sub-type field name. |
| public static final String | FIELD_TYPE
Represents the event type field name. |
| private final int | |
| private final String | |
| public static final int | SUB_TYPE_PRESSED_DOUBLE
Represents a keypad event sub-type for a double key pressed event. |
| public static final int | SUB_TYPE_PRESSED_DOUBLE_LONG
Represents a keypad event sub-type for a double long key pressed event. |
| public static final int | SUB_TYPE_PRESSED_LONG
Represents a keypad event sub-type for a long key pressed event. |
| public static final int | SUB_TYPE_PRESSED_NORMAL
Represents a keypad event sub-type for a normal key pressed event. |
| private final int | |
| private final int | |
| public static final int | TYPE_PRESSED
Represents a keypad event type for a key pressed event. |
| public static final int | TYPE_RELEASED
Represents a keypad event type for a key released event. |
| Access | Constructor and Description |
|---|---|
| public | KeypadData(Map<String, ?>
Contains the new fields)KeypadData instance field values.Constructs new |
| public | KeypadData(long
The data timestamp optional field. timestamp, Map<String, Object> The data metadata optional field. metadata, int The data event type mandatory field. type, int The data event sub-type optional field or subType, int 0 if
there is no sub-type.The data key code mandatory field. keyCode, String The data key name optional field or keyName)null if there
is no key name.Constructs new |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: -1, 0 or 1 depending on the comparison
rules.KeypadData to be compared.Overrides org. Implements java. Compares this |
| public boolean | Returns: true if this object is equivalent to the specified one.The object to compare this data. o)Overrides org. Two |
| public int | |
| public String | Returns: A string with the name of the key ornull if not
specified.Represents a human readable name of the corresponding key code. |
| public int | |
| public int | |
| private String | |
| public int | Returns: The hash code of thisLevelData object.Overrides org. Returns the hash code for this |
| public String | Returns: The string representation of this keypad data.Overrides java. Returns the string representation of this keypad data. |
| private void |
| FIELD_KEY_CODE | back to summary |
|---|---|
| public static final String FIELD_KEY_CODE Represents the key code field name. The field value is available with
| |
| FIELD_KEY_NAME | back to summary |
|---|---|
| public static final String FIELD_KEY_NAME Represents the key name field name. The field value is available with
| |
| FIELD_SUB_TYPE | back to summary |
|---|---|
| public static final String FIELD_SUB_TYPE Represents the event sub-type field name. The field value is available
with | |
| FIELD_TYPE | back to summary |
|---|---|
| public static final String FIELD_TYPE Represents the event type field name. The field value is available with
| |
| keyCode | back to summary |
|---|---|
| private final int keyCode | |
| keyName | back to summary |
|---|---|
| private final String keyName | |
| SUB_TYPE_PRESSED_DOUBLE | back to summary |
|---|---|
| public static final int SUB_TYPE_PRESSED_DOUBLE Represents a keypad event sub-type for a double key pressed event.
Usually, there are two press actions and the key is not held down after
the second press. This sub-type is used with | |
| SUB_TYPE_PRESSED_DOUBLE_LONG | back to summary |
|---|---|
| public static final int SUB_TYPE_PRESSED_DOUBLE_LONG Represents a keypad event sub-type for a double long key pressed event.
Usually, there are two press actions and the key is held down after the
second press. This sub-type is used with | |
| SUB_TYPE_PRESSED_LONG | back to summary |
|---|---|
| public static final int SUB_TYPE_PRESSED_LONG Represents a keypad event sub-type for a long key pressed event. Usually,
there is a single press and the key is held down. This sub-type is used
with | |
| SUB_TYPE_PRESSED_NORMAL | back to summary |
|---|---|
| public static final int SUB_TYPE_PRESSED_NORMAL Represents a keypad event sub-type for a normal key pressed event.
Usually, there is a single press and the key is not held down. This
sub-type is used with | |
| subType | back to summary |
|---|---|
| private final int subType | |
| type | back to summary |
|---|---|
| private final int type | |
| TYPE_PRESSED | back to summary |
|---|---|
| public static final int TYPE_PRESSED Represents a keypad event type for a key pressed event. | |
| TYPE_RELEASED | back to summary |
|---|---|
| public static final int TYPE_RELEASED Represents a keypad event type for a key released event. | |
| KeypadData | back to summary |
|---|---|
| public KeypadData(Map<String, ?> fields) Constructs new
| |
| KeypadData | back to summary |
|---|---|
| public KeypadData(long timestamp, Map<String, Object> metadata, int type, int subType, int keyCode, String keyName) Constructs new
| |
| compareTo | back to summary |
|---|---|
| public int compareTo(Object o) Overrides org. Implements java. Compares this
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides org. Two
| |
| getKeyCode | back to summary |
|---|---|
| public int getKeyCode() The code of the key. This field is mandatory and it holds the semantics(meaning) of the key.
| |
| getKeyName | back to summary |
|---|---|
| public String getKeyName() Represents a human readable name of the corresponding key code. This
field is optional and sometimes it could be missed(might be
| |
| getSubType | back to summary |
|---|---|
| public int getSubType() Returns the event sub-type. The sub-type provides additional details about the event. The sub-type can be one of:
| |
| getType | back to summary |
|---|---|
| public int getType() Returns the event type. The type represents the main reason for this event. It can be one of:
| |
| getTypeAsString | back to summary |
|---|---|
| private String getTypeAsString() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides org. Returns the hash code for this
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns the string representation of this keypad data. | |
| validate | back to summary |
|---|---|
| private void validate() | |