spotlight/ Accelerator
Provides the spotlight/Accelerator.Accelerator class.
import Accelerator from '@enact/spotlight/Accelerator';Members
AcceleratorClass
import Accelerator from '@enact/spotlight/Accelerator';Constructor
Methods
- cancel()undefined
Cancels the Accelerator.
Returns
- undefined
- isAccelerating()Boolean
Verifies that the Accelerator is active.
Returns
- Boolean
trueif the Accelerator is active; otherwise,false.
- processKey(event, callback)Boolean
Called with the current keydown event and callback, which will be called when the event is allowed through.
2 Params
- event Object
The current event to validate.
- callback Function
The callback to execute.
Returns
- Boolean
trueif the event was consumed by processKey and callback was not called
- reset()undefined
Resets the Accelerator instance to the default values.
Returns
- undefined
ArrayBooleanFunctionModuleNumberObjectString