From e4dc39cf19a00ab148de6d1bd6c4cd229cf545f5 Mon Sep 17 00:00:00 2001
From: Mnikolenko Productengine <mnikolenko@productengine.com>
Date: Tue, 11 May 2021 13:25:57 +0300
Subject: [PATCH] SL-15249 FIXED The F1 key does not close the guidebook after
 clicking a link

---
 indra/newview/llfloaterhowto.cpp | 13 +++++++++++++
 indra/newview/llfloaterhowto.h   |  2 ++
 2 files changed, 15 insertions(+)

diff --git a/indra/newview/llfloaterhowto.cpp b/indra/newview/llfloaterhowto.cpp
index 6e913b08eab..2bd2c47dd73 100644
--- a/indra/newview/llfloaterhowto.cpp
+++ b/indra/newview/llfloaterhowto.cpp
@@ -83,3 +83,16 @@ LLFloaterHowTo* LLFloaterHowTo::getInstance()
 {
     return LLFloaterReg::getTypedInstance<LLFloaterHowTo>("how_to");
 }
+
+BOOL LLFloaterHowTo::handleKeyHere(KEY key, MASK mask)
+{
+	BOOL handled = FALSE;
+
+	if (KEY_F1 == key )
+	{
+		closeFloater();
+		handled = TRUE;
+	}
+
+	return handled;
+}
diff --git a/indra/newview/llfloaterhowto.h b/indra/newview/llfloaterhowto.h
index fa1d9cace00..c2703d815bb 100644
--- a/indra/newview/llfloaterhowto.h
+++ b/indra/newview/llfloaterhowto.h
@@ -44,6 +44,8 @@ class LLFloaterHowTo :
 
     void onOpen(const LLSD& key) override;
 
+    virtual BOOL handleKeyHere(KEY key, MASK mask);
+
     static LLFloaterHowTo* getInstance();
 
     bool matchesKey(const LLSD& key) override { return true; /*single instance*/ };
-- 
GitLab