#include <src/ois/OISKeyboard.h>
Public Types | |
enum | Modifier { Shift = 0x0000001, Ctrl = 0x0000010, Alt = 0x0000100 } |
Enum of bit position of modifer. More... | |
enum | TextTranslationMode { Off, Unicode, Ascii } |
TextTranslation Mode. More... | |
Public Member Functions | |
virtual void | copyKeyStates (char keys[256]) const =0 |
virtual const std::string & | getAsString (KeyCode kc)=0 |
KeyListener * | getEventCallback () const |
TextTranslationMode | getTextTranslation () const |
virtual bool | isKeyDown (KeyCode key) const =0 |
bool | isModifierDown (Modifier mod) const |
virtual void | setEventCallback (KeyListener *keyListener) |
virtual void | setTextTranslation (TextTranslationMode mode) |
virtual | ~Keyboard () |
Protected Member Functions | |
Keyboard (const std::string &vendor, bool buffered, int devID, InputManager *creator) | |
Protected Attributes | |
KeyListener * | mListener |
Used for buffered/actionmapping callback. | |
unsigned int | mModifiers |
Bit field that holds status of Alt, Ctrl, Shift. | |
TextTranslationMode | mTextMode |
The current translation mode. |
virtual OIS::Keyboard::~Keyboard | ( | ) | [inline, virtual] |
OIS::Keyboard::Keyboard | ( | const std::string & | vendor, | |
bool | buffered, | |||
int | devID, | |||
InputManager * | creator | |||
) | [inline, protected] |
virtual void OIS::Keyboard::copyKeyStates | ( | char | keys[256] | ) | const [pure virtual] |
Implemented in OIS::LinuxKeyboard, OIS::MacKeyboard, and OIS::Win32Keyboard.
virtual const std::string& OIS::Keyboard::getAsString | ( | KeyCode | kc | ) | [pure virtual] |
kc | KeyCode to convert |
Implemented in OIS::LinuxKeyboard, OIS::MacKeyboard, and OIS::Win32Keyboard.
KeyListener* OIS::Keyboard::getEventCallback | ( | ) | const [inline] |
TextTranslationMode OIS::Keyboard::getTextTranslation | ( | ) | const [inline] |
virtual bool OIS::Keyboard::isKeyDown | ( | KeyCode | key | ) | const [pure virtual] |
key | A KeyCode to check |
Implemented in OIS::LinuxKeyboard, OIS::MacKeyboard, and OIS::Win32Keyboard.
bool Keyboard::isModifierDown | ( | Modifier | mod | ) | const |
virtual void OIS::Keyboard::setEventCallback | ( | KeyListener * | keyListener | ) | [inline, virtual] |
keyListener | Send a pointer to a class derived from KeyListener or 0 to clear the callback |
Referenced by orxonox::InputManager::_initialiseKeyboard().
void Keyboard::setTextTranslation | ( | TextTranslationMode | mode | ) | [virtual] |
mode | Off, Unicode, Ascii |
References mTextMode.
KeyListener* OIS::Keyboard::mListener [protected] |
Used for buffered/actionmapping callback.
Referenced by OIS::LinuxKeyboard::_injectKeyDown(), OIS::LinuxKeyboard::_injectKeyUp(), OIS::Win32Keyboard::_readBuffered(), OIS::MacKeyboard::capture(), and OIS::MacKeyboard::injectEvent().
unsigned int OIS::Keyboard::mModifiers [protected] |
Bit field that holds status of Alt, Ctrl, Shift.
Referenced by OIS::Win32Keyboard::_initialize(), OIS::MacKeyboard::_initialize(), OIS::LinuxKeyboard::_initialize(), OIS::LinuxKeyboard::_injectKeyDown(), OIS::LinuxKeyboard::_injectKeyUp(), OIS::MacKeyboard::_modChangeCallback(), OIS::Win32Keyboard::_read(), OIS::Win32Keyboard::_readBuffered(), and isModifierDown().
TextTranslationMode OIS::Keyboard::mTextMode [protected] |
The current translation mode.
Referenced by OIS::MacKeyboard::_keyDownCallback(), OIS::Win32Keyboard::_translateText(), OIS::LinuxKeyboard::capture(), and setTextTranslation().