Module SCA_KeyboardSensor :: Class SCA_KeyboardSensor
[frames | no frames]

Class SCA_KeyboardSensor

SCA_ILogicBrick --+    
                  |    
        SCA_ISensor --+
                      |
                     SCA_KeyboardSensor


A keyboard sensor detects player key presses.

See module GameKeys for keycode values.
Method Summary
list of key status. [[keycode, status]] getCurrentlyPressedKeys()
Get a list of currently pressed keys that have either been pressed, or just released
  getHold1()
Returns the key code for the first modifier this sensor is looking for.
  getHold2()
Returns the key code for the second modifier this sensor is looking for.
  getKey()
Returns the key code this sensor is looking for.
list of key status. [[keycode, status]] getPressedKeys()
Get a list of keys that have either been pressed, or just released this frame.
  setHold1()
Sets the key code for the first modifier this sensor should look for.
  setHold2()
Sets the key code for the second modifier this sensor should look for.
  setKey(keycode)
Set the key this sensor should listen for.
    Inherited from SCA_ISensor
integer getFrequency()
The frequency for pulse mode sensors.
  getInvert()
True if this sensor activates on negative events.
  getUseNegPulseMode()
True if the sensor is in negative pulse mode.
  getUsePosPulseMode()
True if the sensor is in positive pulse mode.
  isPositive()
True if this sensor brick has been activated.
  setFrequency(freq)
Sets the frequency for pulse mode sensors.
  setInvert(invert)
Sets if this sensor activates on positive or negative events.
  setUseNegPulseMode(pulse)
Sets negative pulse mode.
  setUsePosPulseMode(pulse)
Sets positive pulse mode.
    Inherited from SCA_ILogicBrick
integer getExecutePriority()
Gets the execution priority of this logic brick.
KX_GameObject getOwner()
Gets the game object associated with this logic brick.
  setExecutePriority(priority)
Sets the priority of this logic brick.

Method Details

getCurrentlyPressedKeys()

Get a list of currently pressed keys that have either been pressed, or just released
Returns:
list of key status. [[keycode, status]]

getHold1()

Returns the key code for the first modifier this sensor is looking for.

getHold2()

Returns the key code for the second modifier this sensor is looking for.

getKey()

Returns the key code this sensor is looking for.

getPressedKeys()

Get a list of keys that have either been pressed, or just released this frame.
Returns:
list of key status. [[keycode, status]]

setHold1()

Sets the key code for the first modifier this sensor should look for.

setHold2()

Sets the key code for the second modifier this sensor should look for.

setKey(keycode)

Set the key this sensor should listen for.
Parameters:
keycode
           (type=keycode from GameKeys module)

Generated by Epydoc 2.1 on Thu Feb 1 00:12:33 2007 http://epydoc.sf.net