handleDirectionPress

Handle the direction press event in Arrow Navigation.

This function is used to handle the direction press event in Arrow Navigation. You can use this function to handle the direction press event in your application.

Syntax

import { getArrowNavigation } from '@arrow-navigation/core'

const navigationApi = getArrowNavigation()

navigationApi.handleDirectionPress('down', false)

Parameters

ParameterTypeDescription
directionstringThe direction in which the key was pressed. Possible values are up, down, left, and right.
repeatbooleanWhether the key press event is a repeat event. Default value is false.

Returns

This function returns void.