summaryrefslogtreecommitdiff
path: root/indra/llwindow/llkeyboard.h
diff options
context:
space:
mode:
authorsimon <simon@lindenlab.com>2024-01-03 01:34:58 +0000
committersimon <simon@lindenlab.com>2024-01-03 01:34:58 +0000
commit520f710cd6b5826403383f8c3488a94c64ac8081 (patch)
tree3936a248d991e11b82768ff10a5079789299bb53 /indra/llwindow/llkeyboard.h
parentd4c3300f9b81296f765c83c1e822251e86d91925 (diff)
parenta592292242e29d0379ee72572a434359e1e892d1 (diff)
Merge remote-tracking branch 'origin/main' into simon/sl-20635-new-data
Diffstat (limited to 'indra/llwindow/llkeyboard.h')
-rw-r--r--indra/llwindow/llkeyboard.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/llwindow/llkeyboard.h b/indra/llwindow/llkeyboard.h
index fb1ae10f50..dad150e3c1 100644
--- a/indra/llwindow/llkeyboard.h
+++ b/indra/llwindow/llkeyboard.h
@@ -96,8 +96,10 @@ 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, bool translate = true);
+ static std::string stringFromMouse(EMouseClickType click, 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 );
+ static std::string stringFromAccelerator(MASK accel_mask, EMouseClickType click);
void setCallbacks(LLWindowCallbacks *cbs) { mCallbacks = cbs; }
F32 getKeyElapsedTime( KEY key ); // Returns time in seconds since key was pressed.
@@ -130,6 +132,13 @@ protected:
static std::map<std::string,KEY> sNamesToKeys;
};
+// Interface to get key from assigned command
+class LLKeyBindingToStringHandler
+{
+public:
+ virtual std::string getKeyBindingAsString(const std::string& mode, const std::string& control) const = 0;
+};
+
extern LLKeyboard *gKeyboard;
#endif