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

Event field type for keyboard modifier state.

Parses a wire-format modifier map (string keys, boolean values) into
a `%Plushie.KeyModifiers{}` struct. Missing fields default to `false`.

## Examples

    iex> Plushie.Type.KeyModifiers.parse(%{"ctrl" => true, "shift" => false})
    {:ok, %Plushie.KeyModifiers{ctrl: true, shift: false, alt: false, logo: false, command: false}}

    iex> Plushie.Type.KeyModifiers.parse(%{})
    {:ok, %Plushie.KeyModifiers{}}

    iex> Plushie.Type.KeyModifiers.parse(nil)
    {:ok, %Plushie.KeyModifiers{}}

# `parse`

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

---

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