LLKeyboard Class Reference

#include <llkeyboard.h>

Inheritance diagram for LLKeyboard:

Inheritance graph
[legend]
Collaboration diagram for LLKeyboard:

Collaboration graph
[legend]

List of all members.

Public Types

enum  e_numpad_distinct { ND_NEVER, ND_NUMLOCK_OFF, ND_NUMLOCK_ON }
typedef enum
LLKeyboard::e_numpad_distinct 
ENumpadDistinct

Public Member Functions

 LLKeyboard ()
virtual ~LLKeyboard ()
void resetKeys ()
F32 getCurKeyElapsedTime ()
F32 getCurKeyElapsedFrameCount ()
BOOL getKeyDown (const KEY key)
BOOL getKeyRepeated (const KEY key)
BOOL translateKey (const U16 os_key, KEY *translated_key)
U16 inverseTranslateKey (const KEY translated_key)
BOOL handleTranslatedKeyUp (KEY translated_key, U32 translated_mask)
BOOL handleTranslatedKeyDown (KEY translated_key, U32 translated_mask)
virtual BOOL handleKeyUp (const U16 key, MASK mask)=0
virtual BOOL handleKeyDown (const U16 key, MASK mask)=0
virtual void resetMaskKeys ()=0
virtual void scanKeyboard ()=0
virtual MASK currentMask (BOOL for_mouse_event)=0
virtual KEY currentKey ()
EKeyboardInsertMode getInsertMode ()
void toggleInsertMode ()
e_numpad_distinct getNumpadDistinct ()
void setNumpadDistinct (e_numpad_distinct val)
void setCallbacks (LLWindowCallbacks *cbs)
F32 getKeyElapsedTime (KEY key)
S32 getKeyElapsedFrameCount (KEY key)

Static Public Member Functions

static BOOL maskFromString (const LLString &str, MASK *mask)
static BOOL keyFromString (const LLString &str, KEY *key)
static LLString stringFromKey (KEY key)

Protected Member Functions

void addKeyName (KEY key, const LLString &name)

Protected Attributes

std::map< U16, KEYmTranslateKeyMap
std::map< KEY, U16mInvTranslateKeyMap
LLWindowCallbacksmCallbacks
LLTimer mKeyLevelTimer [KEY_COUNT]
S32 mKeyLevelFrameCount [KEY_COUNT]
BOOL mKeyLevel [KEY_COUNT]
BOOL mKeyRepeated [KEY_COUNT]
BOOL mKeyUp [KEY_COUNT]
BOOL mKeyDown [KEY_COUNT]
KEY mCurTranslatedKey
KEY mCurScanKey
e_numpad_distinct mNumpadDistinct
EKeyboardInsertMode mInsertMode

Static Protected Attributes

static std::map< KEY, LLStringsKeysToNames
static std::map< LLString, KEYsNamesToKeys


Detailed Description

Definition at line 67 of file llkeyboard.h.


Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
ND_NEVER 
ND_NUMLOCK_OFF 
ND_NUMLOCK_ON 

Definition at line 70 of file llkeyboard.h.


Constructor & Destructor Documentation

LLKeyboard::LLKeyboard (  ) 

LLKeyboard::~LLKeyboard (  )  [virtual]

Definition at line 141 of file llkeyboard.cpp.


Member Function Documentation

void LLKeyboard::resetKeys (  ) 

Definition at line 156 of file llkeyboard.cpp.

References FALSE, i, KEY_COUNT, mKeyDown, mKeyLevel, mKeyRepeated, mKeyUp, and S32.

Referenced by LLViewerWindow::handleFocusLost(), idle_startup(), and LLChatBar::stopChat().

Here is the caller graph for this function:

F32 LLKeyboard::getCurKeyElapsedTime (  )  [inline]

Definition at line 84 of file llkeyboard.h.

References getKeyDown(), getKeyElapsedTime(), and mCurScanKey.

Referenced by agent_jump(), agent_push_forwardbackward(), agent_slide_leftright(), agent_turn_left(), agent_turn_right(), and get_orbit_rate().

Here is the call graph for this function:

Here is the caller graph for this function:

F32 LLKeyboard::getCurKeyElapsedFrameCount (  )  [inline]

Definition at line 85 of file llkeyboard.h.

References getKeyDown(), getKeyElapsedFrameCount(), and mCurScanKey.

Referenced by agent_jump(), agent_push_forwardbackward(), and agent_slide_leftright().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLKeyboard::getKeyDown ( const KEY  key  )  [inline]

BOOL LLKeyboard::getKeyRepeated ( const KEY  key  )  [inline]

BOOL LLKeyboard::translateKey ( const U16  os_key,
KEY translated_key 
)

Definition at line 185 of file llkeyboard.cpp.

References FALSE, mTranslateKeyMap, and TRUE.

U16 LLKeyboard::inverseTranslateKey ( const KEY  translated_key  ) 

Definition at line 205 of file llkeyboard.cpp.

References mInvTranslateKeyMap.

BOOL LLKeyboard::handleTranslatedKeyUp ( KEY  translated_key,
U32  translated_mask 
)

Definition at line 248 of file llkeyboard.cpp.

References FALSE, LLWindowCallbacks::handleTranslatedKeyUp(), lldebugst, llendl, mCallbacks, mKeyLevel, mKeyUp, and TRUE.

Here is the call graph for this function:

BOOL LLKeyboard::handleTranslatedKeyDown ( KEY  translated_key,
U32  translated_mask 
)

virtual BOOL LLKeyboard::handleKeyUp ( const U16  key,
MASK  mask 
) [pure virtual]

virtual BOOL LLKeyboard::handleKeyDown ( const U16  key,
MASK  mask 
) [pure virtual]

virtual void LLKeyboard::resetMaskKeys (  )  [pure virtual]

Implemented in LLKeyboardMacOSX, LLKeyboardSDL, and LLKeyboardWin32.

Referenced by LLViewerWindow::handleFocus(), and LLChatBar::stopChat().

Here is the caller graph for this function:

virtual void LLKeyboard::scanKeyboard (  )  [pure virtual]

Implemented in LLKeyboardMacOSX, LLKeyboardSDL, and LLKeyboardWin32.

Referenced by LLAppViewer::mainLoop(), and process_keystrokes_async().

Here is the caller graph for this function:

virtual MASK LLKeyboard::currentMask ( BOOL  for_mouse_event  )  [pure virtual]

virtual KEY LLKeyboard::currentKey (  )  [inline, virtual]

Definition at line 105 of file llkeyboard.h.

References mCurTranslatedKey.

Referenced by LLViewerWindow::handlePerFrameHover(), LLChatBar::onInputEditorKeystroke(), and LLComboBox::onTextEntry().

Here is the caller graph for this function:

EKeyboardInsertMode LLKeyboard::getInsertMode (  )  [inline]

void LLKeyboard::toggleInsertMode (  ) 

Definition at line 270 of file llkeyboard.cpp.

References LL_KIM_INSERT, LL_KIM_OVERWRITE, and mInsertMode.

Referenced by LLTextEditor::handleSpecialKey(), and LLLineEditor::handleSpecialKey().

Here is the caller graph for this function:

BOOL LLKeyboard::maskFromString ( const LLString str,
MASK mask 
) [static]

Definition at line 349 of file llkeyboard.cpp.

References FALSE, MASK_ALT, MASK_CONTROL, MASK_NONE, MASK_SHIFT, and TRUE.

Referenced by LLViewerKeyboard::loadBindings().

Here is the caller graph for this function:

BOOL LLKeyboard::keyFromString ( const LLString str,
KEY key 
) [static]

Definition at line 296 of file llkeyboard.cpp.

References FALSE, get_if_there(), llendl, llwarns, sNamesToKeys, LLStringBase< char >::toUpper(), and TRUE.

Referenced by LLPreviewGesture::createGesture(), LLViewerKeyboard::loadBindings(), LLMenuGL::parseChildXML(), and LLVoiceClient::setPTTKey().

Here is the call graph for this function:

Here is the caller graph for this function:

LLString LLKeyboard::stringFromKey ( KEY  key  )  [static]

e_numpad_distinct LLKeyboard::getNumpadDistinct (  )  [inline]

Definition at line 114 of file llkeyboard.h.

References mNumpadDistinct.

void LLKeyboard::setNumpadDistinct ( e_numpad_distinct  val  )  [inline]

Definition at line 115 of file llkeyboard.h.

References mNumpadDistinct.

Referenced by handleNumpadControlChanged().

Here is the caller graph for this function:

void LLKeyboard::setCallbacks ( LLWindowCallbacks cbs  )  [inline]

Definition at line 117 of file llkeyboard.h.

References mCallbacks.

Referenced by LLWindow::setCallbacks().

Here is the caller graph for this function:

F32 LLKeyboard::getKeyElapsedTime ( KEY  key  ) 

Definition at line 284 of file llkeyboard.cpp.

References LLTimer::getElapsedTimeF32(), and mKeyLevelTimer.

Referenced by LLMenuBarGL::checkMenuTrigger(), and getCurKeyElapsedTime().

Here is the call graph for this function:

Here is the caller graph for this function:

S32 LLKeyboard::getKeyElapsedFrameCount ( KEY  key  ) 

Definition at line 290 of file llkeyboard.cpp.

References mKeyLevelFrameCount.

Referenced by LLMenuBarGL::checkMenuTrigger(), and getCurKeyElapsedFrameCount().

Here is the caller graph for this function:

void LLKeyboard::addKeyName ( KEY  key,
const LLString name 
) [protected]

Definition at line 146 of file llkeyboard.cpp.

References sKeysToNames, sNamesToKeys, and LLStringBase< char >::toUpper().

Referenced by LLKeyboard().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

std::map<U16, KEY> LLKeyboard::mTranslateKeyMap [protected]

Definition at line 125 of file llkeyboard.h.

Referenced by translateKey().

std::map<KEY, U16> LLKeyboard::mInvTranslateKeyMap [protected]

Definition at line 126 of file llkeyboard.h.

Referenced by inverseTranslateKey().

Definition at line 127 of file llkeyboard.h.

Referenced by handleTranslatedKeyDown(), handleTranslatedKeyUp(), and setCallbacks().

Definition at line 129 of file llkeyboard.h.

Referenced by getKeyElapsedTime(), and handleTranslatedKeyDown().

Definition at line 130 of file llkeyboard.h.

Referenced by getKeyElapsedFrameCount(), handleTranslatedKeyDown(), and LLKeyboard().

Definition at line 132 of file llkeyboard.h.

Referenced by getKeyRepeated(), handleTranslatedKeyDown(), LLKeyboard(), and resetKeys().

Definition at line 133 of file llkeyboard.h.

Referenced by handleTranslatedKeyUp(), LLKeyboard(), and resetKeys().

Definition at line 134 of file llkeyboard.h.

Referenced by handleTranslatedKeyDown(), LLKeyboard(), and resetKeys().

Definition at line 135 of file llkeyboard.h.

Referenced by currentKey(), handleTranslatedKeyDown(), and LLKeyboard().

Definition at line 136 of file llkeyboard.h.

Referenced by getCurKeyElapsedFrameCount(), and getCurKeyElapsedTime().

Definition at line 138 of file llkeyboard.h.

Referenced by getNumpadDistinct(), and setNumpadDistinct().

Definition at line 140 of file llkeyboard.h.

Referenced by getInsertMode(), LLKeyboard(), and toggleInsertMode().

std::map< KEY, LLString > LLKeyboard::sKeysToNames [static, protected]

Definition at line 142 of file llkeyboard.h.

Referenced by addKeyName(), and stringFromKey().

std::map< LLString, KEY > LLKeyboard::sNamesToKeys [static, protected]

Definition at line 143 of file llkeyboard.h.

Referenced by addKeyName(), and keyFromString().


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

Generated on Fri May 16 08:51:03 2008 for SecondLife by  doxygen 1.5.5