# DataGridKeyDownContext (@salmonui/data-grid)

> The DataGridKeyDownContext interface of @salmonui/data-grid: Context of onKeyDown.

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

```ts
import type { DataGridKeyDownContext } 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: interface

```ts
interface DataGridKeyDownContext {
    readonly nativeEvent: KeyboardEvent;
    readonly command: string | null;
    readonly context: DataGridKeyContext;
    readonly rowId: RowId | null;
    readonly field: string | null;
    preventDefault(): void;
}
```

Context of `onKeyDown`.

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `nativeEvent` | `readonly nativeEvent: KeyboardEvent;` |  |  |
| `command` | `readonly command: string \| null;` |  | Keyboard command bound to the key in this context (`focus.down`, `edit.begin`), or null. |
| `context` | `readonly context: DataGridKeyContext;` |  |  |
| `rowId` | `readonly rowId: RowId \| null;` |  | Focused cell or header. |
| `field` | `readonly field: string \| null;` |  |  |
| `preventDefault` | `preventDefault(): void;` |  | Suppresses the built-in behavior of the binding. |
