Class: Hokusai::Keyboard
- Inherits:
-
Object
- Object
- Hokusai::Keyboard
- Defined in:
- ui/src/hokusai/types.rb
Instance Attribute Summary collapse
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
-
#initialize(raw) ⇒ Keyboard
constructor
A new instance of Keyboard.
- #key ⇒ Object
- #keyboard_key ⇒ Object
Constructor Details
#initialize(raw) ⇒ Keyboard
Returns a new instance of Keyboard.
211 212 213 |
# File 'ui/src/hokusai/types.rb', line 211 def initialize(raw) @raw = raw end |
Instance Attribute Details
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
191 192 193 |
# File 'ui/src/hokusai/types.rb', line 191 def raw @raw end |
Instance Method Details
#key ⇒ Object
207 208 209 |
# File 'ui/src/hokusai/types.rb', line 207 def key keyboard_key[:key][:key] end |
#keyboard_key ⇒ Object
203 204 205 |
# File 'ui/src/hokusai/types.rb', line 203 def keyboard_key pressed.read_array_of_type(TYPE_UINT8, :read_uint8, pressed_len).first end |