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

Keyboard modifier state at the time of a key event.

Each field is a boolean indicating whether that modifier was held.

## Fields

- `ctrl` - Control key (Ctrl on Windows/Linux).
- `shift` - Shift key.
- `alt` - Alt key (Option on macOS).
- `logo` - Logo/Super key (Windows key, Command symbol on macOS).
- `command` - Platform command key (Ctrl on Windows/Linux, Cmd on macOS).

## Example

    %Plushie.KeyModifiers{ctrl: true, shift: false, alt: false, logo: false, command: true}

Use the query functions for readable conditional logic:

    if KeyModifiers.ctrl?(event.modifiers) do
      handle_shortcut(event)
    end

# `t`

```elixir
@type t() :: %Plushie.KeyModifiers{
  alt: boolean(),
  command: boolean(),
  ctrl: boolean(),
  logo: boolean(),
  shift: boolean()
}
```

# `alt?`

```elixir
@spec alt?(modifiers :: t()) :: boolean()
```

Returns true if the Alt modifier is active.

# `command?`

```elixir
@spec command?(modifiers :: t()) :: boolean()
```

Returns true if the platform Command modifier is active.

# `ctrl?`

```elixir
@spec ctrl?(modifiers :: t()) :: boolean()
```

Returns true if the Ctrl modifier is active.

# `logo?`

```elixir
@spec logo?(modifiers :: t()) :: boolean()
```

Returns true if the Logo/Super modifier is active.

# `shift?`

```elixir
@spec shift?(modifiers :: t()) :: boolean()
```

Returns true if the Shift modifier is active.

---

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