spotlight/Accelerator

import Accelerator from '@enact/spotlight/Accelerator';

Members

AcceleratorClass

import Accelerator from '@enact/spotlight/Accelerator';
Constructor
Accelerator(frequency)
1 Param
frequency ArrayNumber

Controls the frequency with which the acceleration will "freeze". While frozen, the current target item cannot change, and all events are directed to it.

Statics
cancel()

Cancels the Accelerator.

isAccelerating()Boolean

Verifies that the Accelerator is active.

Returns
Boolean

true if 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

true if the event was consumed by processKey and callback was not called

reset()

Resets the Accelerator instance to the default values.

ArrayBooleanFunctionModuleNumberObjectString