Skip to content

class Keyboard internal ​

Represents keyboard state populated by the MRuby/Raylib backend. Should not need to use this directly.

#printable?(type) public ​

Is the pressed key printable?

Arguments ​

  • type - one of the following symbols (:pressed, :down) (default :pressed)

Returns ​

Returns boolean

#symbol internal ​

The symbol form of the pressed key

Examples ​

ruby
keyboard.symbol
#=> :enter

Returns ​

Returns Symbol

#code internal ​

The integer code form of the pressed key

Examples ​

ruby
keyboard.symbol
#=> 257

Returns ​

Returns Symbol

#char internal ​

The char of the presed key

Returns ​

Returns String