summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-12-02 13:48:27 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-12-02 13:48:27 +0200
commit9abac37e42781aaacfc9331627182c2e83f98fd9 (patch)
treebd7366d36008c0faaa10086a795131f8b8bf1944 /indra/newview/llviewerwindow.cpp
parentdd887e24d5afd103f3b7b5ca756daad50c46953e (diff)
SL-14438 Fixed Viewer lost ability to assign Masks as keys
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 93f8cce5c7..9c1aa772d8 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2695,6 +2695,13 @@ void LLViewerWindow::draw()
// Takes a single keyup event, usually when UI is visible
BOOL LLViewerWindow::handleKeyUp(KEY key, MASK mask)
{
+ if (LLSetKeyBindDialog::recordKey(key, mask, FALSE))
+ {
+ LL_DEBUGS() << "KeyUp handled by LLSetKeyBindDialog" << LL_ENDL;
+ LLViewerEventRecorder::instance().logKeyEvent(key, mask);
+ return TRUE;
+ }
+
LLFocusableElement* keyboard_focus = gFocusMgr.getKeyboardFocus();
if (keyboard_focus
@@ -2738,8 +2745,9 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
// hide tooltips on keypress
LLToolTipMgr::instance().blockToolTips();
- // let menus handle navigation keys for navigation
- if (LLSetKeyBindDialog::recordKey(key, mask))
+ // Menus get handled on key down instead of key up
+ // so keybindings have to be recorded before that
+ if (LLSetKeyBindDialog::recordKey(key, mask, TRUE))
{
LL_DEBUGS() << "Key handled by LLSetKeyBindDialog" << LL_ENDL;
LLViewerEventRecorder::instance().logKeyEvent(key,mask);