gamnit :: GamnitKeyEvent :: defaultinit
gamnit $ GamnitKeyEvent :: NATIVE
Type of thenative
underlying SDL 2 event
gamnit $ GamnitKeyEvent :: SELF
Type of this instance, automatically specialized in every classgamnit $ GamnitKeyEvent :: is_arrow_right
Key is the right arrow key?gamnit :: GamnitInputEvent :: NATIVE
Type of thenative
underlying SDL 2 event
gamnit :: GamnitInputEvent :: buffer
Native SDL 2 event buffer with the pseudo class hierarchy metadatagamnit :: GamnitInputEvent :: buffer=
Native SDL 2 event buffer with the pseudo class hierarchy metadatacore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
gamnit :: GamnitKeyEvent :: defaultinit
mnit :: KeyEvent :: defaultinit
mnit :: InputEvent :: defaultinit
core :: Object :: defaultinit
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: output_class_name
Display class name on stdout (debug only).
# Event on keyboard input
class GamnitKeyEvent
super GamnitInputEvent
super KeyEvent
redef type NATIVE: SDLKeyboardEvent
redef fun is_down do return buffer.is_keydown
redef fun is_up do return buffer.is_keyup
redef fun is_arrow_up do return native.keysym.is_up
redef fun is_arrow_left do return native.keysym.is_left
redef fun is_arrow_down do return native.keysym.is_down
redef fun is_arrow_right do return native.keysym.is_right
redef fun to_c do return native.to_s.chars.first
redef fun name do return native.to_s.to_lower
end
lib/gamnit/gamnit_linux.nit:114,1--129,3