summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinput.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-01-04 14:43:45 -0500
committerNat Goodspeed <nat@lindenlab.com>2024-01-04 14:43:45 -0500
commit197a1ddef8a0b7bc7872339ec82b2a5bc5cbb3b4 (patch)
tree31b2bf3eeb026334ed20cd6e4f8fb15f91a07b0f /indra/newview/llviewerinput.h
parent5a6174c0853f5a140343725312f2b63b42f2bbad (diff)
parenta592292242e29d0379ee72572a434359e1e892d1 (diff)
DRTVWR-589: Merge branch 'main' into DRTVWR-589
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,