GeoLeaf Core API - v3.0.0
    Preparing search index...
    • Maps an arrow / Home / End key press to the index that should receive focus.

      Pure index arithmetic — the caller owns preventDefault(), focus and any tabindex bookkeeping, because those differ between the two widgets (the mobile toolbar swaps tabindex on move, the desktop tab strip only focuses).

      Parameters

      • key: string

        The KeyboardEvent.key value.

      • currentIndex: number

        Index of the currently focused item, already validated as in-range.

      • count: number

        Number of focusable items; must be ≥ 1.

      Returns number | null

      The target index, or null when the key is not a navigation key.