Class: Hokusai::Keyboard

Inherits:
Object
  • Object
show all
Defined in:
ui/src/hokusai/types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#rawObject (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

#keyObject



207
208
209
# File 'ui/src/hokusai/types.rb', line 207

def key
  keyboard_key[:key][:key]
end

#keyboard_keyObject



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