Class: Chamomile::KeyEvent
- Inherits:
-
Data
- Object
- Data
- Chamomile::KeyEvent
- Defined in:
- lib/chamomile/messages.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#mod ⇒ Object
readonly
Returns the value of attribute mod.
Instance Method Summary collapse
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key
10 11 12 |
# File 'lib/chamomile/messages.rb', line 10 def key @key end |
#mod ⇒ Object (readonly)
Returns the value of attribute mod
10 11 12 |
# File 'lib/chamomile/messages.rb', line 10 def mod @mod end |
Instance Method Details
#alt? ⇒ Boolean
13 |
# File 'lib/chamomile/messages.rb', line 13 def alt? = mod.include?(:alt) |
#ctrl? ⇒ Boolean
11 |
# File 'lib/chamomile/messages.rb', line 11 def ctrl? = mod.include?(:ctrl) |
#shift? ⇒ Boolean
12 |
# File 'lib/chamomile/messages.rb', line 12 def shift? = mod.include?(:shift) |
#to_s ⇒ Object
14 |
# File 'lib/chamomile/messages.rb', line 14 def to_s = mod.empty? ? key.to_s : "#{mod.join("+")}+#{key}" |