# `Plushie.Type.Key`
[🔗](https://github.com/plushie-ui/plushie-elixir/blob/v0.7.2/lib/plushie/type/key.ex#L1)

Event field type for keyboard key names.

Parses wire-format key name strings (PascalCase, e.g. `"ArrowRight"`,
`"Escape"`) into Elixir atoms (`:arrow_right`, `:escape`). Single
character keys pass through as strings (`"a"`, `"1"`).

Delegates to `Plushie.Protocol.Keys.parse_key/1` for the actual mapping.

## Examples

    iex> Plushie.Type.Key.parse("Escape")
    {:ok, :escape}

    iex> Plushie.Type.Key.parse("a")
    {:ok, "a"}

    iex> Plushie.Type.Key.parse(nil)
    :error

# `parse`

```elixir
@spec parse(value :: term()) :: {:ok, atom() | String.t()} | :error
```

---

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