Moai SDK  1.5 revision 1 (MoaiEdition)
MOAIKeyboardSensor Class Reference
Inheritance diagram for MOAIKeyboardSensor:
MOAISensor

List of all members.

Function List

  keyDown
  keyIsDown
  keyIsUp
  keyUp
  setCallback

Function Documentation

Checks to see if one or more buttons were pressed during the last iteration.


function keyDown ( MOAIKeyboardSensor self, string keyCodes )
Parameters:
self ( MOAIKeyboardSensor )
keyCodes ( string ) Keycode value(s) to be checked against the input table.
Returns:
wasPressed ( boolean... )
Note:

function keyDown ( MOAIKeyboardSensor self, number keyCode )
Parameters:
self ( MOAIKeyboardSensor )
keyCode ( number ) Keycode value to be checked against the input table.
Returns:
wasPressed ( boolean )
Note:

Checks to see if the button is currently down.


function keyIsDown ( MOAIKeyboardSensor self, string keyCodes )
Parameters:
self ( MOAIKeyboardSensor )
keyCodes ( string ) Keycode value(s) to be checked against the input table.
Returns:
isDown ( boolean... )
Note:

function keyIsDown ( MOAIKeyboardSensor self, number keyCode )
Parameters:
self ( MOAIKeyboardSensor )
keyCode ( number ) Keycode value to be checked against the input table.
Returns:
isDown ( boolean )
Note:

Checks to see if the specified key is currently up.


function keyIsUp ( MOAIKeyboardSensor self, string keyCodes )
Parameters:
self ( MOAIKeyboardSensor )
keyCodes ( string ) Keycode value(s) to be checked against the input table.
Returns:
isUp ( boolean... )
Note:

function keyIsUp ( MOAIKeyboardSensor self, number keyCode )
Parameters:
self ( MOAIKeyboardSensor )
keyCode ( number ) Keycode value to be checked against the input table.
Returns:
isUp ( boolean )
Note:

Checks to see if the specified key was released during the last iteration.


function keyUp ( MOAIKeyboardSensor self, string keyCodes )
Parameters:
self ( MOAIKeyboardSensor )
keyCodes ( string ) Keycode value(s) to be checked against the input table.
Returns:
wasReleased ( boolean... )
Note:

function keyUp ( MOAIKeyboardSensor self, number keyCode )
Parameters:
self ( MOAIKeyboardSensor )
keyCode ( number ) Keycode value to be checked against the input table.
Returns:
wasReleased ( boolean )
Note:

Sets or clears the callback to be issued when a key is pressed.


function setCallback ( MOAIKeyboardSensor self [, function callback ] )
Parameters:
self ( MOAIKeyboardSensor )
callback ( function ) Optional. Default value is nil.
Returns:
nil