diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2021-11-23 21:23:45 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2021-11-23 21:23:45 -0500 |
commit | d71e0a6d4778d4c67b8793ba569fee2db226bc8e (patch) | |
tree | dce713230aa611dbada3c6f78903d988b1ae06a4 /indra/newview/llviewerinput.h | |
parent | 67ace0df9953ce3264048c3946720a9df492edfa (diff) | |
parent | 8852cb9cbd25df8d25fa43cf39b222ab8381ebd6 (diff) |
SL-16094, SL-16400: Merge branch 'DRTVWR-546' into glthread
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 281a209896..ca70ac76bf 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; @@ -149,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); @@ -164,6 +172,10 @@ private: std::vector<LLKeyboardBinding> mKeyBindings[MODE_COUNT]; std::vector<LLMouseBinding> mMouseBindings[MODE_COUNT]; + // 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; |