---
id: "packages/active-grid/api/use-keyboard-navigation"
title: "useKeyboardNavigation"
description: "useKeyboardNavigation: generated from the source of active-grid."
url: "/packages/active-grid/api/use-keyboard-navigation"
locale: "en"
revision: "g0mvjxwj5c-88bdbe1c:use-keyboard-navigation"
---

# useKeyboardNavigation

Exported by `@workspace/active-grid`. Generated from the package source; part of [the index of every export](/packages/active-grid/api).

## Functions, hooks and constants

**useKeyboardNavigation**: `<TData>(grid: Grid<TData>, options?: KeyboardNavigationOptions) => UseKeyboardNavigationReturn`

Returns an object with:

| Prop | Type | Required | Description |
| --- | --- | --- | --- |
| `focusedCell` | `CellPosition \| null` | yes |  |
| `restoreFocus` | `() => boolean` | yes |  |
| `getCellProps` | `(rowIndex: number, colIndex: number) => CellKeyboardProps` | yes |  |
| `registerCellRef` | `(rowIndex: number, colIndex: number, el: HTMLElement \| null) => void` | yes |  |
| `containerProps` | `GridContainerKeyboardProps` | yes |  |
