Class: SDL2::Event::Keyboard
- Inherits:
-
SDL2::Event
- Object
- SDL2::Event
- SDL2::Event::Keyboard
- Defined in:
- event.c,
event.c
Overview
Instance Attribute Summary (collapse)
-
- (Integer) mod
current key modifier.
-
- (Integer) pressed
(also: #pressed?)
key is pressed.
-
- (Integer) repeat
(also: #repeat?)
key repeat.
-
- (Integer) scancode
physical key code.
-
- (Integer) sym
virtual key code.
-
- (Integer) window_id
the associate window id.
Attributes inherited from SDL2::Event
Instance Method Summary (collapse)
-
- (String) inspect
Inspection string.
Methods inherited from SDL2::Event
enable=, enabled?, poll, #window
Instance Attribute Details
- (Integer) mod
current key modifier
- (Integer) pressed Also known as: pressed?
key is pressed
- (Integer) repeat Also known as: repeat?
key repeat
- (Integer) scancode
physical key code
- (Integer) sym
virtual key code
- (Integer) window_id
the associate window id
Instance Method Details
- (String) inspect
Returns inspection string
351 352 353 354 355 356 357 358 359 360 |
# File 'event.c', line 351
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);
}
|