Class: SDL2::Event::Keyboard
- Inherits:
-
SDL2::Event
- Object
- SDL2::Event
- SDL2::Event::Keyboard
- Defined in:
- event.c,
event.c
Overview
Instance Attribute Summary collapse
-
#mod ⇒ Integer
current key modifier.
-
#pressed ⇒ Integer
(also: #pressed?)
key is pressed.
-
#repeat ⇒ Integer
(also: #repeat?)
key repeat.
-
#scancode ⇒ Integer
physical key code.
-
#sym ⇒ Integer
virtual key code.
-
#window_id ⇒ Integer
the associate window id.
Attributes inherited from SDL2::Event
Instance Method Summary collapse
-
#inspect ⇒ String
Inspection string.
Methods inherited from SDL2::Event
enable=, enabled?, poll, #window
Instance Attribute Details
#mod ⇒ Integer
current key modifier
#pressed ⇒ Integer Also known as: pressed?
key is pressed
#repeat ⇒ Integer Also known as: repeat?
key repeat
#scancode ⇒ Integer
physical key code
#sym ⇒ Integer
virtual key code
#window_id ⇒ Integer
the associate window id
Instance Method Details
#inspect ⇒ String
Returns inspection string
358 359 360 361 362 363 364 365 366 367 |
# File 'event.c', line 358
static VALUE EvKeyboard_inspect(VALUE self)
{
SDL_Event* ev; Data_Get_Struct(self, SDL_Event, ev);
return rb_sprintf("<%s: type=%u timestamp=%u"
" window_id=%u state=%u repeat=%u"
" scancode=%u sym=%u mod=%u>",
rb_obj_classname(self), ev->common.type, ev->common.timestamp,
ev->key.windowID, ev->key.state, ev->key.repeat,
ev->key.keysym.scancode, ev->key.keysym.sym, ev->key.keysym.mod);
}
|