/***************************************************************************
keyboardsensor.h - description
-------------------
begin : Wed Dec 20 2000
copyright : (C) 2000 by Jan Walter
email : jan@blender.nl
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef KEYBOARDSENSOR_H
#define KEYBOARDSENSOR_H
#include <sensor.h>
/**A KeyboardSensor is a special kind of a general sensor.
*@author Jan Walter
*/
class Sensor.html">KeyboardSensor : public Sensor {
public:
KeyboardSensor();
~KeyboardSensor();
/** Set the key this sensor should listen to. The variable keycode can be any code from GameKeys. */
PyObject* setKey(int keycode);
/** Return the code of the key this sensor is listening to. */
PyObject* getKey();
/** Set the first modifier to the key this sensor should listen to. The variable keycode can be any code from GameKeys. */
PyObject* setHold1(int keycode);
/** Return the code of the first key modifier to the key this sensor is listening to. */
PyObject* getHold1();
/** Set the second modifier to the key this sensor should listen to. The variable keycode can be any code from GameKeys. */
PyObject* setHold2(int keycode);
/** Return the code of the second key modifier to the key this sensor is listening to. */
PyObject* getHold2();
/** Get a list of pressed keys that have either been pressed, or just released this frame. */
PyObject* getPressedKeys();
};
#endif
Documentation generated by jan@nvidea on Thu Dec 21 14:04:43 CET 2000