KeyHoldContext

open class KeyHoldContext

Represents the context of a current key hold action.

See also

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open fun isActive(): Boolean
Checks if the current key hold action is running
Link copied to clipboard
open fun isStarted(): Boolean
Checks if the key hold action thread has started holding the key
Link copied to clipboard
open fun isStopped(): Boolean
Checks if the current key hold action was stopped through stop
Link copied to clipboard
open fun stop()
Stops the current key hold action
Link copied to clipboard
open fun waitFor()
Waits for the key hold action to complete.
open fun waitFor(timeoutMs: Long): Boolean
Waits for the key hold action to complete up until the specified timeout.
Link copied to clipboard
open fun waitForStart()
Waits for the key hold action to start holding the key
open fun waitForStart(timeoutMs: Long): Boolean
Waits for the key hold action to start holding the key, up to the specified timeout time