# KeyboardEventLike

Public Composite.KeyboardEventLike behavioral model.

## Signatures

```ts
export interface KeyboardEventLike {
    readonly key: string;
    readonly altKey?: boolean;
    readonly ctrlKey?: boolean;
    readonly metaKey?: boolean;
    preventDefault?: () => void;
}
```

## Why

The public model lets custom composites reuse Composite's deterministic policy without copying
an internal shape.

## Ownership and lifetime

This declaration is data or schema metadata and acquires no resources.

## Example

Import with `import type { KeyboardEventLike } from "@typed/ui/Composite";` Extend the
[Composite.makeState runnable setup](https://tylors.github.io/typed/reference/symbols/QHR5cGVkL3VpL0NvbXBvc2l0ZSNtYWtlU3RhdGU/). Custom
keyboard adapters need only the modeled surface:
`const event: KeyboardEventLike = { key: "ArrowDown", preventDefault() {} }`.

## Property: altKey

Whether Alt modified the key event.

## Property: ctrlKey

Whether Control modified the key event.

## Property: key

Native KeyboardEvent key value to interpret.

## Property: metaKey

Whether Meta modified the key event.

## Property: preventDefault

Optional native-event callback invoked only for an internally handled key.
