# DataGridKeyHandler (@salmonui/data-grid)

> The DataGridKeyHandler type of @salmonui/data-grid: Handler for a keyboard command; return true when it handled the key (the event is then consumed).

Canonical: https://salmonui.dev/docs/reference/data-grid/DataGridKeyHandler

```ts
import type { DataGridKeyHandler } from '@salmonui/data-grid';
```

Entry index: https://salmonui.dev/docs/reference/data-grid (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/data-grid.md).

## Reference

Kind: type

```ts
type DataGridKeyHandler = (ctx: {
    readonly nativeEvent: KeyboardEvent;
    readonly context: DataGridKeyContext;
    readonly command: string;
}) => boolean;
```

Handler for a keyboard command; return true when it handled the key (the event is then consumed).
