Class: KeyboardHook::Event
- Inherits:
-
Object
- Object
- KeyboardHook::Event
- Defined in:
- lib/rum/windows/keyboard_hook.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#scancode ⇒ Object
readonly
Returns the value of attribute scancode.
Instance Method Summary collapse
- #down? ⇒ Boolean
-
#initialize(id, scancode, down) ⇒ Event
constructor
A new instance of Event.
- #to_s ⇒ Object
Constructor Details
#initialize(id, scancode, down) ⇒ Event
Returns a new instance of Event.
4 5 6 7 8 |
# File 'lib/rum/windows/keyboard_hook.rb', line 4 def initialize(id, scancode, down) @id = id @scancode = scancode @down = down end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/rum/windows/keyboard_hook.rb', line 3 def id @id end |
#scancode ⇒ Object (readonly)
Returns the value of attribute scancode.
3 4 5 |
# File 'lib/rum/windows/keyboard_hook.rb', line 3 def scancode @scancode end |
Instance Method Details
#down? ⇒ Boolean
10 11 12 |
# File 'lib/rum/windows/keyboard_hook.rb', line 10 def down? @down end |
#to_s ⇒ Object
14 15 16 |
# File 'lib/rum/windows/keyboard_hook.rb', line 14 def to_s "#{@down ? 'Down' : 'Up'}: VKCode #@id, Scancode #@scancode" end |