# `Plushie.Event.KeyEvent`
[🔗](https://github.com/plushie-ui/plushie-elixir/blob/v0.6.0/lib/plushie/event/key_event.ex#L1)

Keyboard press and release events.

## Pattern matching

    def update(model, %KeyEvent{type: :press, key: :escape, captured: false}), do: ...
    def update(model, %KeyEvent{type: :press, key: "s", modifiers: %{command: true}}), do: ...

# `key`

```elixir
@type key() :: atom() | String.t()
```

# `location`

```elixir
@type location() :: :standard | :left | :right | :numpad
```

# `t`

```elixir
@type t() :: %Plushie.Event.KeyEvent{
  captured: boolean(),
  key: key(),
  location: location(),
  modified_key: key() | nil,
  modifiers: Plushie.KeyModifiers.t(),
  physical_key: key() | nil,
  repeat: boolean(),
  text: String.t() | nil,
  type: :press | :release,
  window_id: String.t() | nil
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
