summaryrefslogtreecommitdiff
path: root/indra/llui/llmenugl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llmenugl.cpp')
-rw-r--r--indra/llui/llmenugl.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index fba0984dce..3237ef8e27 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -3902,6 +3902,13 @@ BOOL LLMenuBarGL::handleKeyHere(KEY key, MASK mask)
{
mAltKeyTrigger = FALSE;
}
+
+ if (key == KEY_ESCAPE && mask == MASK_NONE)
+ {
+ LLMenuGL::setKeyboardMode(FALSE);
+ // if any menus are visible, this will return TRUE, stopping further processing of ESCAPE key
+ return LLMenuGL::sMenuContainer->hideMenus();
+ }
// before processing any other key, check to see if ALT key has triggered menu access
checkMenuTrigger();