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.
-
#window_id ⇒ Object
readonly
Returns the value of attribute window_id.
-
#window_id [String, nil] window that was focused when the event fired([String, nil]) ⇒ Object
readonly
Modifier key state change events.
Instance Method Summary collapse
-
#initialize(modifiers:, captured: false, window_id: nil) ⇒ Modifiers
constructor
A new instance of Modifiers.
Constructor Details
#initialize(modifiers:, captured: false, window_id: nil) ⇒ Modifiers
Returns a new instance of Modifiers.
182 183 184 |
# File 'lib/plushie/event.rb', line 182 def initialize(modifiers:, captured: false, window_id: nil) super end |
Instance Attribute Details
#captured ⇒ Object (readonly)
Returns the value of attribute captured
181 182 183 |
# File 'lib/plushie/event.rb', line 181 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.
181 182 183 184 185 |
# File 'lib/plushie/event.rb', line 181 Modifiers = Data.define(:modifiers, :captured, :window_id) do def initialize(modifiers:, captured: false, window_id: nil) super end end |
#modifiers ⇒ Object (readonly)
Returns the value of attribute modifiers
181 182 183 |
# File 'lib/plushie/event.rb', line 181 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.
181 182 183 184 185 |
# File 'lib/plushie/event.rb', line 181 Modifiers = Data.define(:modifiers, :captured, :window_id) do def initialize(modifiers:, captured: false, window_id: nil) super end end |
#window_id ⇒ Object (readonly)
Returns the value of attribute window_id
181 182 183 |
# File 'lib/plushie/event.rb', line 181 def window_id @window_id end |
#window_id [String, nil] window that was focused when the event fired([String, nil]) ⇒ Object (readonly)
Modifier key state change events. Triggered when modifier keys (shift, ctrl, alt, command) change state. Subscribe via Subscription.on_modifiers_changed.
181 182 183 184 185 |
# File 'lib/plushie/event.rb', line 181 Modifiers = Data.define(:modifiers, :captured, :window_id) do def initialize(modifiers:, captured: false, window_id: nil) super end end |