diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-04-01 21:34:44 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-04-01 21:34:44 +0300 |
commit | 4c889f7e5252d8c82b0ffc3e13af5bf5d32a6047 (patch) | |
tree | 7cd047318bfd924ee2381409841f01d9284aca46 /indra/llwindow/llkeyboard.h | |
parent | 6dbde938e2c72259e941b10fe0a96ba196c95de9 (diff) | |
parent | 167e45e309ebeaccb346b8ca05884b8e10bf05eb (diff) |
Merge branch 'master' (DRTVWR-514) into DRTVWR-518-ui
# Conflicts:
# indra/newview/skins/default/xui/en/menu_viewer.xml SL-12494 vs SL-15034
Diffstat (limited to 'indra/llwindow/llkeyboard.h')
-rw-r--r-- | indra/llwindow/llkeyboard.h | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/indra/llwindow/llkeyboard.h b/indra/llwindow/llkeyboard.h index 6f2dc87317..36bd8bcbed 100644 --- a/indra/llwindow/llkeyboard.h +++ b/indra/llwindow/llkeyboard.h @@ -38,10 +38,10 @@ enum EKeystate { KEYSTATE_DOWN, KEYSTATE_LEVEL, - KEYSTATE_UP + KEYSTATE_UP }; -typedef boost::function<void(EKeystate keystate)> LLKeyFunc; +typedef boost::function<bool(EKeystate keystate)> LLKeyFunc; typedef std::string (LLKeyStringTranslatorFunc)(const char *label); enum EKeyboardInsertMode @@ -50,15 +50,6 @@ enum EKeyboardInsertMode LL_KIM_OVERWRITE }; -class LLKeyBinding -{ -public: - KEY mKey; - MASK mMask; -// const char *mName; // unused - LLKeyFunc mFunction; -}; - class LLWindowCallbacks; class LLKeyboard @@ -103,7 +94,8 @@ public: static BOOL maskFromString(const std::string& str, MASK *mask); // False on failure static BOOL keyFromString(const std::string& str, KEY *key); // False on failure - static std::string stringFromKey(KEY key); + static std::string stringFromKey(KEY key, bool translate = true); + static std::string stringFromAccelerator( MASK accel_mask ); // separated for convinience, returns with "+": "Shift+" or "Shift+Alt+"... static std::string stringFromAccelerator( MASK accel_mask, KEY key ); void setCallbacks(LLWindowCallbacks *cbs) { mCallbacks = cbs; } |