#include <OISKeyboard.h>
Public Types | |
| enum | TextTranslationMode { Off, Unicode, Ascii } |
| TextTranslation Mode. More... | |
| enum | Modifier { Shift = 0x0000001, Ctrl = 0x0000010, Alt = 0x0000100 } |
| Enum of bit position of modifer. More... | |
Public Member Functions | |
| virtual | ~Keyboard () |
| virtual bool | isKeyDown (KeyCode key)=0 |
| virtual void | setEventCallback (KeyListener *keyListener) |
| KeyListener * | getEventCallback () |
| virtual void | setTextTranslation (TextTranslationMode mode) |
| TextTranslationMode | getTextTranslation () |
| virtual const std::string & | getAsString (KeyCode kc)=0 |
| bool | isModifierDown (Modifier mod) |
| virtual void | copyKeyStates (char keys[256])=0 |
Protected Member Functions | |
| Keyboard () | |
Protected Attributes | |
| unsigned int | mModifiers |
| Bit field that holds status of Alt, Ctrl, Shift. | |
| KeyListener * | listener |
| Used for buffered/actionmapping callback. | |
| TextTranslationMode | mTextMode |
| The current translation mode. | |
Definition at line 211 of file OISKeyboard.h.
| virtual OIS::Keyboard::~Keyboard | ( | ) | [inline, virtual] |
Definition at line 214 of file OISKeyboard.h.
| Keyboard::Keyboard | ( | ) | [protected] |
Definition at line 28 of file OISKeyboard.cpp.
| virtual bool OIS::Keyboard::isKeyDown | ( | KeyCode | key | ) | [pure virtual] |
| key | A KeyCode to check |
Implemented in OIS::LinuxKeyboard, OIS::MacKeyboard, OIS::SDLKeyboard, and OIS::Win32Keyboard.
Referenced by handleNonBufferedKeys(), and WinMain().
| 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 |
Definition at line 231 of file OISKeyboard.h.
Referenced by doStartup(), and initOIS().
| KeyListener* OIS::Keyboard::getEventCallback | ( | ) | [inline] |
| void Keyboard::setTextTranslation | ( | TextTranslationMode | mode | ) | [virtual] |
| mode | Off, Unicode, Ascii |
Reimplemented in OIS::SDLKeyboard.
Definition at line 33 of file OISKeyboard.cpp.
References mTextMode.
| TextTranslationMode OIS::Keyboard::getTextTranslation | ( | ) | [inline] |
| virtual const std::string& OIS::Keyboard::getAsString | ( | KeyCode | kc | ) | [pure virtual] |
| kc | KeyCode to convert |
Implemented in OIS::LinuxKeyboard, OIS::MacKeyboard, OIS::SDLKeyboard, and OIS::Win32Keyboard.
| bool Keyboard::isModifierDown | ( | Modifier | mod | ) |
Definition at line 39 of file OISKeyboard.cpp.
References mModifiers.
Referenced by handleNonBufferedKeys().
| virtual void OIS::Keyboard::copyKeyStates | ( | char | keys[256] | ) | [pure virtual] |
Implemented in OIS::LinuxKeyboard, OIS::MacKeyboard, OIS::SDLKeyboard, and OIS::Win32Keyboard.
unsigned int OIS::Keyboard::mModifiers [protected] |
Bit field that holds status of Alt, Ctrl, Shift.
Definition at line 301 of file OISKeyboard.h.
Referenced by OIS::Win32Keyboard::_initialize(), OIS::SDLKeyboard::_initialize(), OIS::MacKeyboard::_initialize(), OIS::LinuxKeyboard::_initialize(), OIS::MacKeyboard::_modChangeCallback(), OIS::Win32Keyboard::_read(), OIS::Win32Keyboard::_readBuffered(), and isModifierDown().
KeyListener* OIS::Keyboard::listener [protected] |
Used for buffered/actionmapping callback.
Definition at line 304 of file OISKeyboard.h.
Referenced by OIS::Win32Keyboard::_readBuffered(), OIS::SDLKeyboard::capture(), OIS::MacKeyboard::capture(), OIS::MacKeyboard::injectEvent(), OIS::LinuxKeyboard::LinuxKeyboard(), OIS::SDLKeyboard::SDLKeyboard(), and OIS::Win32Keyboard::Win32Keyboard().
TextTranslationMode OIS::Keyboard::mTextMode [protected] |
The current translation mode.
Definition at line 307 of file OISKeyboard.h.
Referenced by OIS::MacKeyboard::_keyDownCallback(), OIS::Win32Keyboard::_translateText(), OIS::LinuxKeyboard::capture(), OIS::SDLKeyboard::setTextTranslation(), and setTextTranslation().
1.5.4