I am trying to add more info about pressed keys in the spatial navigation on the functions onEnterPress and onArrowPress.
It's a paramter called detail:
{
pressedKeys: {
[KEY]: number
}
}
the pressedKeys property contains the pressed keys in the moment the function is called, the number represent how many times the keydown event is fired before releasing it (while pressing a key, multiple keydown events are fired and when the key is released a keyup event is fired, that number represent the number of keydowns on the same key before the keyup happens)
With those info we can discard unwanted events, they could be useful also to implement long press.
I am trying to add more info about pressed keys in the spatial navigation on the functions
onEnterPress
andonArrowPress
. It's a paramter calleddetail
:the
pressedKeys
property contains the pressed keys in the moment the function is called, the number represent how many times the keydown event is fired before releasing it (while pressing a key, multiple keydown events are fired and when the key is released a keyup event is fired, that number represent the number of keydowns on the same key before the keyup happens)With those info we can discard unwanted events, they could be useful also to implement long press.