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

Class SCA_KeyboardSensor

source code

SCA_ILogicBrick.SCA_ILogicBrick --+    
                                  |    
            SCA_ISensor.SCA_ISensor --+
                                      |
                                     SCA_KeyboardSensor

A keyboard sensor detects player key presses.

See module GameKeys for keycode values.

Instance Methods [hide private]
 
getKey()
Returns the key code this sensor is looking for.
source code
 
setKey(keycode)
Set the key this sensor should listen for.
source code
 
getHold1()
Returns the key code for the first modifier this sensor is looking for.
source code
 
setHold1()
Sets the key code for the first modifier this sensor should look for.
source code
 
getHold2()
Returns the key code for the second modifier this sensor is looking for.
source code
 
setHold2()
Sets the key code for the second modifier this sensor should look for.
source code
list of key status. [[keycode, status]]
getPressedKeys()
Get a list of keys that have either been pressed, or just released this frame.
source code
list of key status. [[keycode, status]]
getCurrentlyPressedKeys()
Get a list of currently pressed keys that have either been pressed, or just released
source code

Inherited from SCA_ISensor.SCA_ISensor: getFrequency, getInvert, getLevel, getUseNegPulseMode, getUsePosPulseMode, isPositive, isTriggered, reset, setFrequency, setInvert, setLevel, setUseNegPulseMode, setUsePosPulseMode

Inherited from SCA_ILogicBrick.SCA_ILogicBrick: getExecutePriority, getOwner, setExecutePriority

Method Details [hide private]

setKey(keycode)

source code 

Set the key this sensor should listen for.

Parameters:
  • keycode (keycode from GameKeys module)