View Source AFK.Keycode.Modifier (afk v0.3.2)

Represents a basic modifier keycode, like control, shift, etc.

All standard modifiers on a keyboard can be represented by Modifier keycodes. The currently supported modifiers are modifier/0.

Link to this section Summary

Functions

Creates a basic modifier keycode.

Link to this section Types

@type modifier() ::
  :left_control
  | :left_shift
  | :left_alt
  | :left_super
  | :right_control
  | :right_shift
  | :right_alt
  | :right_super
@type t() :: %AFK.Keycode.Modifier{modifier: modifier()}

Link to this section Functions

@spec new(modifier()) :: t()

Creates a basic modifier keycode.

examples

Examples

iex> new(:left_control)
%AFK.Keycode.Modifier{modifier: :left_control}

iex> new(:right_super)
%AFK.Keycode.Modifier{modifier: :right_super}