Orxonox  0.0.5 Codename: Arcturus
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
OIS::LinuxKeyboard Class Reference

Linux implementation of Keyboard object - uses x11. More...

#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/external/ois/linux/LinuxKeyboard.h>

Inheritance diagram for OIS::LinuxKeyboard:
OIS::Keyboard OIS::Object

Public Member Functions

 LinuxKeyboard (InputManager *creator, bool buffered, bool grab)
 
virtual ~LinuxKeyboard ()
 
virtual void _initialize ()
 
virtual void capture ()
 
virtual void copyKeyStates (char keys[256]) const
 
virtual const std::string & getAsString (KeyCode kc)
 
virtual bool isKeyDown (KeyCode key) const
 
virtual InterfacequeryInterface (Interface::IType)
 
virtual void setBuffered (bool buffered)
 
- Public Member Functions inherited from OIS::Keyboard
virtual ~Keyboard ()
 
KeyListenergetEventCallback () const
 
TextTranslationMode getTextTranslation () const
 
bool isModifierDown (Modifier mod) const
 
virtual void setEventCallback (KeyListener *keyListener)
 
virtual void setTextTranslation (TextTranslationMode mode)
 
- Public Member Functions inherited from OIS::Object
virtual ~Object ()
 
virtual bool buffered () const
 
InputManagergetCreator () const
 
virtual int getID () const
 
Type type () const
 
const std::string & vendor () const
 

Protected Types

typedef std::map< KeySym, KeyCodeXtoOIS_KeyMap
 1:1 Conversion Map between X Key Events and OIS KeyCodes More...
 

Protected Member Functions

bool _injectKeyDown (KeySym key, int text)
 
bool _injectKeyUp (KeySym key)
 
bool _isKeyRepeat (XEvent &event)
 
- Protected Member Functions inherited from OIS::Keyboard
 Keyboard (const std::string &vendor, bool buffered, int devID, InputManager *creator)
 
- Protected Member Functions inherited from OIS::Object
 Object (const std::string &vendor, Type iType, bool buffered, int devID, InputManager *creator)
 

Protected Attributes

Display * display
 
bool grabKeyboard
 
char KeyBuffer [256]
 Depressed Key List. More...
 
XtoOIS_KeyMap keyConversion
 
bool keyFocusLost
 
std::string mGetString
 
Window window
 X11 Stuff. More...
 
- Protected Attributes inherited from OIS::Keyboard
KeyListenermListener
 Used for buffered/actionmapping callback. More...
 
unsigned int mModifiers
 Bit field that holds status of Alt, Ctrl, Shift. More...
 
TextTranslationMode mTextMode
 The current translation mode. More...
 
- Protected Attributes inherited from OIS::Object
bool mBuffered
 Buffered flag. More...
 
InputManagermCreator
 The creator who created this object. More...
 
int mDevID
 Not fully implemented yet. More...
 
Type mType
 Type of controller object. More...
 
std::string mVendor
 Vendor name if applicable/known. More...
 

Additional Inherited Members

- Public Types inherited from OIS::Keyboard
enum  Modifier { Shift = 0x0000001, Ctrl = 0x0000010, Alt = 0x0000100 }
 Enum of bit position of modifer. More...
 
enum  TextTranslationMode { Off, Unicode, Ascii }
 TextTranslation Mode. More...
 

Detailed Description

Linux implementation of Keyboard object - uses x11.

Member Typedef Documentation

typedef std::map<KeySym, KeyCode> OIS::LinuxKeyboard::XtoOIS_KeyMap
protected

1:1 Conversion Map between X Key Events and OIS KeyCodes

Constructor & Destructor Documentation

LinuxKeyboard::LinuxKeyboard ( InputManager creator,
bool  buffered,
bool  grab 
)
LinuxKeyboard::~LinuxKeyboard ( )
virtual

Member Function Documentation

void LinuxKeyboard::_initialize ( )
virtual

Remarks
Internal... Do not call this directly.

Implements OIS::Object.

bool LinuxKeyboard::_injectKeyDown ( KeySym  key,
int  text 
)
protected
bool LinuxKeyboard::_injectKeyUp ( KeySym  key)
protected
bool OIS::LinuxKeyboard::_isKeyRepeat ( XEvent &  event)
inlineprotected
void LinuxKeyboard::capture ( )
virtual

Remarks
Used for updating call once per frame before checking state or to update events

Implements OIS::Object.

void LinuxKeyboard::copyKeyStates ( char  keys[256]) const
virtual

Remarks
Copies the state of the keys into the sent buffer (in the form of 1 is down and 0 is up)

Implements OIS::Keyboard.

const std::string & LinuxKeyboard::getAsString ( KeyCode  kc)
virtual

Remarks
Translates KeyCode to string representation. For example, KC_ENTER will be "Enter" - Locale specific of course.
Parameters
kcKeyCode to convert
Returns
The string as determined from the current locale

Implements OIS::Keyboard.

bool LinuxKeyboard::isKeyDown ( KeyCode  key) const
virtual

Remarks
Returns true if key is donwn
Parameters
keyA KeyCode to check

Implements OIS::Keyboard.

virtual Interface* OIS::LinuxKeyboard::queryInterface ( Interface::IType  )
inlinevirtual

Remarks
If available, get an interface to write to some devices. Examples include, turning on and off LEDs, ForceFeedback, etc
Parameters
typeThe type of interface you are looking for

Implements OIS::Object.

void LinuxKeyboard::setBuffered ( bool  buffered)
virtual

Remarks
Sets buffered mode

Implements OIS::Object.

Member Data Documentation

Display* OIS::LinuxKeyboard::display
protected
bool OIS::LinuxKeyboard::grabKeyboard
protected
char OIS::LinuxKeyboard::KeyBuffer[256]
protected

Depressed Key List.

XtoOIS_KeyMap OIS::LinuxKeyboard::keyConversion
protected
bool OIS::LinuxKeyboard::keyFocusLost
protected
std::string OIS::LinuxKeyboard::mGetString
protected
Window OIS::LinuxKeyboard::window
protected

X11 Stuff.


The documentation for this class was generated from the following files: