onLongPress

fun onLongPress(keyId: K3KeyId, index: Int): Boolean(source)

Resolve the K3Key by keyId and perform onLongPress.

This function attempts to look up the corresponding K3Key in the model. If the key exists, it delegates the processing to the overloaded onKeyPress function.

Return

true if the key press was successfully handled and processed; false otherwise (e.g., if the K3Key with K3KeyId could not be found or the key press was ignored).

Parameters

keyId

The K3KeyId that was pressed.

index

The index in the K3Key.longPressKeyIds list that was pressed.


open fun onLongPress(key: K3Key, index: Int): Boolean(source)

Handle the longPressActions a K3Key has specified.

Return

true if the key action was successfully performed. false if the key action was unsuccessful or one of K3Key.longPressKeyIds or K3Key.longPressDefaultKeyId was null

Parameters

key

The K3Key that was pressed.

index

The index in the K3Key.longPressKeyIds list that was pressed.