java.lang.Object | ||
↳ | java.lang.Enum<E extends java.lang.Enum<E>> | |
↳ | com.datalogic.device.input.MappingTriggerPolicy |
The key event trigger policy.
Enum Values | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
MappingTriggerPolicy | DOWN | Triggered whenever a key is pressed down | |||||||||
MappingTriggerPolicy | LONG_PRESS_TIMED_OUT | Triggered when a long press is detected after pressing for a certain amount of time. | |||||||||
MappingTriggerPolicy | LONG_PRESS_UP | Triggered when users release the key after a long press. | |||||||||
MappingTriggerPolicy | MULTIPLE_PRESS_UP | Triggered when a multiple press is detected, such as a double click. | |||||||||
MappingTriggerPolicy | SINGLE_PRESS_UP | Triggered when a single press is detected. | |||||||||
MappingTriggerPolicy | UP | Triggered whenever a key is releasing | |||||||||
MappingTriggerPolicy | VERY_LONG_PRESS_TIMED_OUT | Triggered when a very long press is detected after pressing for a certain amount of time. | |||||||||
MappingTriggerPolicy | VERY_LONG_PRESS_UP | Triggered when users release the key after a very long press. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CREATOR |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Enum
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
android.os.Parcelable
| |||||||||||
From interface
java.lang.Comparable
|
Triggered whenever a key is pressed down
Triggered when a long press is detected after pressing for a certain amount of time.
You may configure the timeout by ARG_LONG_PRESS_TIMEOUT
Triggered when users release the key after a long press.
Note that you must use this policy together with LONG_PRESS_TIMED_OUT
.
If you want to map some actions to this event only, prepare a Map with LONG_PRESS_TIMED_OUT
mapped to null. For example:
Map{ LONG_PRESS_TIMED_OUT -> null, LONG_PRESS_UP -> [your customized action]}
Then use this map as the mappingInfo (second parameter) of mapKey(VScanEntry, Map)
Triggered when a multiple press is detected, such as a double click.
You may configure the arguments of the multiple press by using these arguments:
ARG_MULTIPLE_PRESS_COUNT
(2 for double click),
ARG_MULTIPLE_PRESS_MAX_INTERVAL
,
ARG_MULTIPLE_PRESS_MAX_BREAK
Triggered when a single press is detected.
Triggered whenever a key is releasing
Triggered when a very long press is detected after pressing for a certain amount of time.
You may configure the timeout by ARG_VERY_LONG_PRESS_TIMEOUT
Triggered when users release the key after a very long press.
Note that you must use this policy together with VERY_LONG_PRESS_TIMED_OUT
.
If you want to map some actions to this event only, prepare a Map with VERY_LONG_PRESS_TIMED_OUT
mapped to null. For example:
Map{ VERY_LONG_PRESS_TIMED_OUT -> null, VERY_LONG_PRESS_UP -> [your customized action]}
Then use this map as the mappingInfo (second parameter) of mapKey(VScanEntry, Map)