diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2021-11-19 04:45:15 +0200 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2021-11-19 04:45:15 +0200 |
commit | 49dd88e86c8e5939fbd82d5a5316c36ade262ca2 (patch) | |
tree | f66707306782df4229657cdc4fb25fe70ab0bd18 /indra/newview/llviewerinput.h | |
parent | 5649bb0c2297e4597fd2c904f0e8bb3db8051240 (diff) | |
parent | 9957c28ddc5e5c129af2db662da7d69f1509af65 (diff) |
Merge branch 'master' into DRTVWR-540-maint
# Conflicts:
# indra/newview/llfloatereditextdaycycle.cpp
# indra/newview/llviewerinput.cpp
Diffstat (limited to 'indra/newview/llviewerinput.h')
-rw-r--r-- | indra/newview/llviewerinput.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/newview/llviewerinput.h b/indra/newview/llviewerinput.h index b0c53b23ee..52e95e2168 100644 --- a/indra/newview/llviewerinput.h +++ b/indra/newview/llviewerinput.h @@ -111,6 +111,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; @@ -152,7 +159,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); @@ -168,6 +176,10 @@ private: std::vector<LLMouseBinding> mMouseBindings[MODE_COUNT]; bool mLMouseDefaultHandling[MODE_COUNT]; // Due to having special priority + // keybindings that do not consume event and are handled earlier, before floaters + std::vector<LLKeyboardBinding> mGlobalKeyBindings[MODE_COUNT]; + std::vector<LLMouseBinding> mGlobalMouseBindings[MODE_COUNT]; + typedef std::map<U32, U32> key_remap_t; key_remap_t mRemapKeys[MODE_COUNT]; std::set<KEY> mKeysSkippedByUI; |