Class: Plushie::Event::Modifiers
- Inherits:
-
Data
- Object
- Data
- Plushie::Event::Modifiers
- Defined in:
- lib/plushie/event.rb
Overview
Modifier key state change events. Triggered when modifier keys (shift, ctrl, alt, command) change state. Subscribe via Subscription.on_modifiers_changed.
Instance Attribute Summary collapse
-
#captured ⇒ Object
readonly
Returns the value of attribute captured.
-
#captured [Boolean] true if a widget consumed this event([Boolean]) ⇒ Object
readonly
Modifier key state change events.
-
#modifiers ⇒ Object
readonly
Returns the value of attribute modifiers.
-
#modifiers [Hash] current modifier state ({shift: true, control: false, alt: false, command: false})([Hash]({shift: true, control: false, alt: false, command: false})) ⇒ Object
readonly
Modifier key state change events.
Instance Method Summary collapse
-
#initialize(modifiers:, captured: false) ⇒ Modifiers
constructor
A new instance of Modifiers.
Constructor Details
#initialize(modifiers:, captured: false) ⇒ Modifiers
Returns a new instance of Modifiers.
249 250 251 |
# File 'lib/plushie/event.rb', line 249 def initialize(modifiers:, captured: false) super end |
Instance Attribute Details
#captured ⇒ Object (readonly)
Returns the value of attribute captured
248 249 250 |
# File 'lib/plushie/event.rb', line 248 def captured @captured end |
#captured [Boolean] true if a widget consumed this event([Boolean]) ⇒ Object (readonly)
Modifier key state change events. Triggered when modifier keys (shift, ctrl, alt, command) change state. Subscribe via Subscription.on_modifiers_changed.
248 249 250 251 252 |
# File 'lib/plushie/event.rb', line 248 Modifiers = Data.define(:modifiers, :captured) do def initialize(modifiers:, captured: false) super end end |
#modifiers ⇒ Object (readonly)
Returns the value of attribute modifiers
248 249 250 |
# File 'lib/plushie/event.rb', line 248 def modifiers @modifiers end |
#modifiers [Hash] current modifier state ({shift: true, control: false, alt: false, command: false})([Hash]({shift: true, control: false, alt: false, command: false})) ⇒ Object (readonly)
Modifier key state change events. Triggered when modifier keys (shift, ctrl, alt, command) change state. Subscribe via Subscription.on_modifiers_changed.
248 249 250 251 252 |
# File 'lib/plushie/event.rb', line 248 Modifiers = Data.define(:modifiers, :captured) do def initialize(modifiers:, captured: false) super end end |