summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinput.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/newview/llviewerinput.h
parentd4c3300f9b81296f765c83c1e822251e86d91925 (diff)
parenta592292242e29d0379ee72572a434359e1e892d1 (diff)
Merge remote-tracking branch 'origin/main' into simon/sl-20635-new-data
Diffstat (limited to 'indra/newview/llviewerinput.h')
-rw-r--r--indra/newview/llviewerinput.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/indra/newview/llviewerinput.h b/indra/newview/llviewerinput.h
index 52e95e2168..41e289ac1d 100644
--- a/indra/newview/llviewerinput.h
+++ b/indra/newview/llviewerinput.h
@@ -28,12 +28,13 @@
#define LL_LLVIEWERINPUT_H
#include "llkeyboard.h" // For EKeystate
-#include "llinitparam.h"
const S32 MAX_KEY_BINDINGS = 128; // was 60
const S32 keybindings_xml_version = 1;
const std::string script_mouse_handler_name = "script_trigger_lbutton";
+class LLWindow;
+
class LLNamedFunction
{
public:
@@ -51,6 +52,7 @@ public:
MASK mMask;
LLKeyFunc mFunction;
+ std::string mFunctionName;
};
class LLMouseBinding
@@ -60,6 +62,7 @@ public:
MASK mMask;
LLKeyFunc mFunction;
+ std::string mFunctionName;
};
@@ -72,11 +75,7 @@ typedef enum e_keyboard_mode
MODE_COUNT
} EKeyboardMode;
-class LLWindow;
-
-void bind_keyboard_functions();
-
-class LLViewerInput
+class LLViewerInput : public LLKeyBindingToStringHandler
{
public:
struct KeyBinding : public LLInitParam::Block<KeyBinding>
@@ -107,6 +106,7 @@ public:
};
LLViewerInput();
+ virtual ~LLViewerInput();
BOOL handleKey(KEY key, MASK mask, BOOL repeated);
BOOL handleKeyUp(KEY key, MASK mask);
@@ -121,7 +121,7 @@ public:
S32 loadBindingsXML(const std::string& filename); // returns number bound, 0 on error
EKeyboardMode getMode() const;
- static BOOL modeFromString(const std::string& string, S32 *mode); // False on failure
+ static bool modeFromString(const std::string& string, S32 *mode); // False on failure
static BOOL mouseFromString(const std::string& string, EMouseClickType *mode);// False on failure
bool scanKey(KEY key,
@@ -136,6 +136,9 @@ public:
bool isMouseBindUsed(const EMouseClickType mouse, const MASK mask, const S32 mode) const;
bool isLMouseHandlingDefault(const S32 mode) const { return mLMouseDefaultHandling[mode]; }
+ // inherited from LLKeyBindingToStringHandler
+ virtual std::string getKeyBindingAsString(const std::string& mode, const std::string& control) const override;
+
private:
bool scanKey(const std::vector<LLKeyboardBinding> &binding,
S32 binding_count,