summaryrefslogtreecommitdiff
path: root/indra/llwindow/llkeyboard.h
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-09-19 16:59:23 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-06-23 14:46:15 +0300
commit5322f41250851e210ad130cbf7b5fa1c04efb6ce (patch)
tree86bdf83a3bf8e352a7b0ed31636bd489090d6b1e /indra/llwindow/llkeyboard.h
parent31e0cefb6c1eabfe931d3b95b585947cce3b21ff (diff)
SL-6109 Extended Key-to-string functionality
Diffstat (limited to 'indra/llwindow/llkeyboard.h')
-rw-r--r--indra/llwindow/llkeyboard.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/indra/llwindow/llkeyboard.h b/indra/llwindow/llkeyboard.h
index 6f2dc87317..f6404164e7 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
@@ -104,6 +95,7 @@ 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 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; }