furo-navigation-pad

furo-navigation-pad #

@furo/util v2.1.19
import '@furo/util/src/furo-navigation-pad.js';
exports FuroNavigationPad js
exports <furo-navigation-pad> custom-element-definition
superclass LitElement
mixes FBP

summary keyboard navigation helper

furo-navigation-pad listens to different keyboard navigation events like the arrow keys. It will attach the listeners to the parent node and cancel the default and stop the propagation of the events.

The events are available as standalone events or as combined event in the navigated event.

1
2
3
4
<!-- forward all navigation events except the Escape  -->
<furo-navigation-pad
    ignored-keys="Escape" at-navigated="--navpad"
    ></furo-navigation-pad>

Attributes and Properties #

ignoredKeys #

ignored-keys String

Enter the keys you want to ignore as comma seperated values.

i.e. “Escape, ArrowLeft”

Events #

at-navigatedString

Generic navigation event, fired when one of the navigation keys was pressed, detail contains one of these: Escape | Enter | ArrowDown | ArrowUp |ArrowLeft|ArrowRight| PageUp | PageDown | Home | End

enter-pressed #

at-enter-pressedKeyboardEvent

Fired when Enter key was pressed.

arrow-down-pressed #

at-arrow-down-pressedKeyboardEvent

Fired when ArrowDown key was pressed.

arrow-up-pressed #

at-arrow-up-pressedKeyboardEvent

Fired when ArrowUp key was pressed.

arrow-left-pressed #

at-arrow-left-pressedKeyboardEvent

Fired when ArrowLeft key was pressed.

arrow-right-pressed #

at-arrow-right-pressedKeyboardEvent

Fired when ArrowRight key was pressed.

escape-pressed #

at-escape-pressedKeyboardEvent

Fired when Escape key was pressed.

page-up-pressed #

at-page-up-pressedKeyboardEvent

Fired when PageUp key was pressed.

page-down-pressed #

at-page-down-pressedKeyboardEvent

Fired when PageDown key was pressed.

home-pressed #

at-home-pressedKeyboardEvent

Fired when Home key was pressed.

end-pressed #

at-end-pressedKeyboardEvent

Fired when End key was pressed.

Methods #