Handles keyboard events.
More...
#include <keyboard.h>
|
| struct | Implementation |
| |
| struct | KeyEvent |
| | Represents a single key press or release. More...
|
| |
|
|
| Keyboard () |
| | Constructor.
|
| |
|
| ~Keyboard () |
| | Destructor.
|
| |
| const std::list< KeyEvent > & | eventQueue () const |
| | A list of key events in the current frame. More...
|
| |
| void | init (OIS::InputManager *inputManager, CEGUI::InputAggregator *aggregator) |
| | Initializes the keyboard. More...
|
| |
| bool | isKeyDown (OIS::KeyCode key) const |
| | Checks whether a key is pressed down. More...
|
| |
|
void | shutdown () |
| | Shuts down the keyboard.
|
| |
|
void | update () |
| | Updates the queue with new events.
|
| |
| bool | wasKeyPressed (OIS::KeyCode key) const |
| | Checks whether a key was pressed down since the last frame. More...
|
| |
| bool | wasKeyReleased (OIS::KeyCode key) const |
| | Checks whether a key was released since the last frame. More...
|
| |
A list of key events in the current frame.
The list is cleared and newly populated for each call to update().
- Returns
| void Keyboard::init |
( |
OIS::InputManager * |
inputManager, |
|
|
CEGUI::InputAggregator * |
aggregator |
|
) |
| |
Initializes the keyboard.
- Parameters
-
| inputManager | The input manager to use |
| bool Keyboard::isKeyDown |
( |
OIS::KeyCode |
key | ) |
const |
Checks whether a key is pressed down.
- Parameters
-
- Returns
true if the key is pressed down during this frame, false otherwise
| luabind::scope Keyboard::luaBindings |
( |
| ) |
|
|
static |
| bool Keyboard::wasKeyPressed |
( |
OIS::KeyCode |
key | ) |
const |
Checks whether a key was pressed down since the last frame.
This function compares the state of the previous and this frame. If key was not down in the last frame and down in this frame, it returns true.
- Parameters
-
- Returns
true if key was pressed down
| bool Keyboard::wasKeyReleased |
( |
OIS::KeyCode |
key | ) |
const |
Checks whether a key was released since the last frame.
This function compares the state of the previous and this frame. If key was down in the last frame and not down in this frame, it returns true.
- Parameters
-
- Returns
true if key was released
The documentation for this class was generated from the following files:
- /home/hhyyrylainen/Projects/thrive_install/thrive/src/ogre/keyboard.h
- /home/hhyyrylainen/Projects/thrive_install/thrive/src/ogre/keyboard.cpp