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
Summary
Functions
Returns true if the Alt modifier is active.
Returns true if the platform Command modifier is active.
Returns true if the Ctrl modifier is active.
Returns true if the Logo/Super modifier is active.
Returns true if the Shift modifier is active.
Types
Functions
Returns true if the Alt modifier is active.
Returns true if the platform Command modifier is active.
Returns true if the Ctrl modifier is active.
Returns true if the Logo/Super modifier is active.
Returns true if the Shift modifier is active.