Class: Hokusai::KeyUpEvent
Instance Attribute Summary
#input
Attributes inherited from Event
#bubbles, #captures, #stopped
Instance Method Summary
collapse
#hovered, #initialize, #to_json
Methods inherited from Event
#bubble, #matches, name, #name, #stop, #to_json
Instance Method Details
#capture(block, _) ⇒ Object
54
55
56
|
# File 'ui/src/hokusai/events/keyboard.rb', line 54
def capture(block, _)
captures << block if matches(block) && released_len > 0
end
|
#char ⇒ Object
50
51
52
|
# File 'ui/src/hokusai/events/keyboard.rb', line 50
def char
code.chr
end
|
#code ⇒ Object
46
47
48
|
# File 'ui/src/hokusai/events/keyboard.rb', line 46
def code
keyboard_key[:char_code]
end
|
#key ⇒ Object
42
43
44
|
# File 'ui/src/hokusai/events/keyboard.rb', line 42
def key
keyboard_key[:key][:key]
end
|
#keyboard_key ⇒ Object
38
39
40
|
# File 'ui/src/hokusai/events/keyboard.rb', line 38
def keyboard_key
input.raw[:keyboard][:released]
end
|