Module ...

Basic keypress handler The engine calls receiveKey when a key is pressed

Functions

_M:handleStatus (sym, ctrl, shift, alt, meta, unicode, isup) Maintain the self.status table, which can be used to know if a key is currently pressed
_M:receiveKey (sym, ctrl, shift, alt, meta, unicode, isup, key) Called when a key is pressed
_M:setCurrent () Setups as the current game keyhandler


Functions

_M:handleStatus (sym, ctrl, shift, alt, meta, unicode, isup)
Maintain the self.status table, which can be used to know if a key is currently pressed

Parameters

  • sym:
  • ctrl:
  • shift:
  • alt:
  • meta:
  • unicode:
  • isup:
_M:receiveKey (sym, ctrl, shift, alt, meta, unicode, isup, key)
Called when a key is pressed

Parameters

  • sym: a number representing the key, see all the _FOO fields
  • ctrl: is the control key pressed?
  • shift: is the shit key pressed?
  • alt: is the alt key pressed?
  • meta: is the meta key pressed?
  • unicode: the unicode representation of the key, if possible
  • isup: true if the key was released, false if pressed
  • key: the unicode representation of the key pressed (without accounting for modifiers)
_M:setCurrent ()
Setups as the current game keyhandler

Valid XHTML 1.0!