From 2d855a9fd7ea0ef32f8d9de81b2532b3771142e4 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 16 Jul 2021 22:45:41 +0300 Subject: SL-15594 Reimplement previous voice keybind behavior Also fixed dupplicate checks --- indra/newview/llviewerinput.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/newview/llviewerinput.h') diff --git a/indra/newview/llviewerinput.h b/indra/newview/llviewerinput.h index 281a209896..8401f8cd95 100644 --- a/indra/newview/llviewerinput.h +++ b/indra/newview/llviewerinput.h @@ -109,6 +109,13 @@ public: BOOL handleKey(KEY key, MASK mask, BOOL repeated); BOOL handleKeyUp(KEY key, MASK mask); + // Handle 'global' keybindings that do not consume event, + // yet need to be processed early + // Example: we want voice to toggle even if some floater is focused + bool handleGlobalBindsKeyDown(KEY key, MASK mask); + bool handleGlobalBindsKeyUp(KEY key, MASK mask); + bool handleGlobalBindsMouse(EMouseClickType clicktype, MASK mask, bool down); + S32 loadBindingsXML(const std::string& filename); // returns number bound, 0 on error EKeyboardMode getMode() const; @@ -164,6 +171,10 @@ private: std::vector mKeyBindings[MODE_COUNT]; std::vector mMouseBindings[MODE_COUNT]; + // keybindings that do not consume event and are handled earlier, before floaters + std::vector mGlobalKeyBindings[MODE_COUNT]; + std::vector mGlobalMouseBindings[MODE_COUNT]; + typedef std::map key_remap_t; key_remap_t mRemapKeys[MODE_COUNT]; std::set mKeysSkippedByUI; -- cgit v1.2.3 From 84a0ae682ab18f0366528d7d6d449ab95a1fb3f9 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 21 Jul 2021 22:15:12 +0300 Subject: SL-15611 Do not ignore mask modifiers for mouse-teleporting --- indra/newview/llviewerinput.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewerinput.h') diff --git a/indra/newview/llviewerinput.h b/indra/newview/llviewerinput.h index 8401f8cd95..ca70ac76bf 100644 --- a/indra/newview/llviewerinput.h +++ b/indra/newview/llviewerinput.h @@ -156,7 +156,8 @@ private: S32 binding_count, EMouseClickType mouse, MASK mask, - EMouseState state) const; + EMouseState state, + bool ignore_additional_masks) const; S32 loadBindingMode(const LLViewerInput::KeyMode& keymode, S32 mode); BOOL bindKey(const S32 mode, const KEY key, const MASK mask, const std::string& function_name); -- cgit v1.2.3