summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llwindow/llkeyboard.cpp8
-rw-r--r--indra/llwindow/llkeyboard.h12
-rw-r--r--indra/llwindow/llkeyboardheadless.cpp4
-rw-r--r--indra/llwindow/llkeyboardheadless.h4
4 files changed, 14 insertions, 14 deletions
diff --git a/indra/llwindow/llkeyboard.cpp b/indra/llwindow/llkeyboard.cpp
index f154351ce3..b3dcac6222 100644
--- a/indra/llwindow/llkeyboard.cpp
+++ b/indra/llwindow/llkeyboard.cpp
@@ -195,9 +195,9 @@ void LLKeyboard::resetKeys()
}
-BOOL LLKeyboard::translateKey(const U32 os_key, KEY *out_key)
+BOOL LLKeyboard::translateKey(const U16 os_key, KEY *out_key)
{
- std::map<U32, KEY>::iterator iter;
+ std::map<U16, KEY>::iterator iter;
// Only translate keys in the map, ignore all other keys for now
iter = mTranslateKeyMap.find(os_key);
@@ -215,9 +215,9 @@ BOOL LLKeyboard::translateKey(const U32 os_key, KEY *out_key)
}
-U32 LLKeyboard::inverseTranslateKey(const KEY translated_key)
+U16 LLKeyboard::inverseTranslateKey(const KEY translated_key)
{
- std::map<KEY, U32>::iterator iter;
+ std::map<KEY, U16>::iterator iter;
iter = mInvTranslateKeyMap.find(translated_key);
if (iter == mInvTranslateKeyMap.end())
{
diff --git a/indra/llwindow/llkeyboard.h b/indra/llwindow/llkeyboard.h
index 1a6292f29f..e406de347c 100644
--- a/indra/llwindow/llkeyboard.h
+++ b/indra/llwindow/llkeyboard.h
@@ -67,14 +67,14 @@ public:
BOOL getKeyDown(const KEY key) { return mKeyLevel[key]; }
BOOL getKeyRepeated(const KEY key) { return mKeyRepeated[key]; }
- BOOL translateKey(const U32 os_key, KEY *translated_key);
- U32 inverseTranslateKey(const KEY translated_key);
+ BOOL translateKey(const U16 os_key, KEY *translated_key);
+ U16 inverseTranslateKey(const KEY translated_key);
BOOL handleTranslatedKeyUp(KEY translated_key, U32 translated_mask); // Translated into "Linden" keycodes
BOOL handleTranslatedKeyDown(KEY translated_key, U32 translated_mask); // Translated into "Linden" keycodes
- virtual BOOL handleKeyUp(const U32 key, MASK mask) = 0;
- virtual BOOL handleKeyDown(const U32 key, MASK mask) = 0;
+ virtual BOOL handleKeyUp(const U16 key, MASK mask) = 0;
+ virtual BOOL handleKeyDown(const U16 key, MASK mask) = 0;
#if defined(LL_DARWIN) && !defined(LL_SDL)
// We only actually use this for OS X.
@@ -111,8 +111,8 @@ protected:
void addKeyName(KEY key, const std::string& name);
protected:
- std::map<U32, KEY> mTranslateKeyMap; // Map of translations from OS keys to Linden KEYs
- std::map<KEY, U32> mInvTranslateKeyMap; // Map of translations from Linden KEYs to OS keys
+ std::map<U16, KEY> mTranslateKeyMap; // Map of translations from OS keys to Linden KEYs
+ std::map<KEY, U16> mInvTranslateKeyMap; // Map of translations from Linden KEYs to OS keys
LLWindowCallbacks *mCallbacks;
LLTimer mKeyLevelTimer[KEY_COUNT]; // Time since level was set
diff --git a/indra/llwindow/llkeyboardheadless.cpp b/indra/llwindow/llkeyboardheadless.cpp
index 3e81aff626..01ac26261b 100644
--- a/indra/llwindow/llkeyboardheadless.cpp
+++ b/indra/llwindow/llkeyboardheadless.cpp
@@ -35,11 +35,11 @@ void LLKeyboardHeadless::resetMaskKeys()
{ }
-BOOL LLKeyboardHeadless::handleKeyDown(const U32 key, const U32 mask)
+BOOL LLKeyboardHeadless::handleKeyDown(const U16 key, const U32 mask)
{ return FALSE; }
-BOOL LLKeyboardHeadless::handleKeyUp(const U32 key, const U32 mask)
+BOOL LLKeyboardHeadless::handleKeyUp(const U16 key, const U32 mask)
{ return FALSE; }
MASK LLKeyboardHeadless::currentMask(BOOL for_mouse_event)
diff --git a/indra/llwindow/llkeyboardheadless.h b/indra/llwindow/llkeyboardheadless.h
index 73910ed883..8e067e6108 100644
--- a/indra/llwindow/llkeyboardheadless.h
+++ b/indra/llwindow/llkeyboardheadless.h
@@ -35,8 +35,8 @@ public:
LLKeyboardHeadless();
/*virtual*/ ~LLKeyboardHeadless() {};
- /*virtual*/ BOOL handleKeyUp(const U32 key, MASK mask);
- /*virtual*/ BOOL handleKeyDown(const U32 key, MASK mask);
+ /*virtual*/ BOOL handleKeyUp(const U16 key, MASK mask);
+ /*virtual*/ BOOL handleKeyDown(const U16 key, MASK mask);
/*virtual*/ void resetMaskKeys();
/*virtual*/ MASK currentMask(BOOL for_mouse_event);
/*virtual*/ void scanKeyboard();