KeyboardSensor Class Reference

[GameLogic Index] [GameLogic Hierarchy]


A KeyboardSensor is a special kind of a general sensor More...

#include <keyboardsensor.h>

Inherits: Sensor

Public Members


Detailed Description

A KeyboardSensor is a special kind of a general sensor.


PyObject* setKey(int keycode)

Set the key this sensor should listen to. The variable keycode can be any code from GameKeys.

PyObject* getKey()

Return the code of the key this sensor is listening to.

PyObject* setHold1(int keycode)

Set the first modifier to the key this sensor should listen to. The variable keycode can be any code from GameKeys.

PyObject* getHold1()

Return the code of the first key modifier to the key this sensor is listening to.

PyObject* setHold2(int keycode)

Set the second modifier to the key this sensor should listen to. The variable keycode can be any code from GameKeys.

PyObject* getHold2()

Return the code of the second key modifier to the key this sensor is listening to.

PyObject* getPressedKeys()

Get a list of pressed keys that have either been pressed, or just released this frame.


  • Author: Jan Walter
  • Documentation generated by jan@nvidea on Thu Dec 21 14:04:43 CET 2000
Kdoc