summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/chatwindow.cpp16
-rw-r--r--src/gui/setupactiondata.h5
-rw-r--r--src/keyboarddata.h7
-rw-r--r--src/keydata.h1
4 files changed, 26 insertions, 3 deletions
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp
index 2892bb842..cde943c68 100644
--- a/src/gui/chatwindow.cpp
+++ b/src/gui/chatwindow.cpp
@@ -746,9 +746,19 @@ void ChatWindow::mousePressed(gcn::MouseEvent &event)
Tab *const tab = mChatTabs->getSelectedTab();
if (tab)
{
- ChatTab *const cTab = dynamic_cast<ChatTab*>(tab);
- if (cTab)
- viewport->showChatPopup(cTab);
+ if (inputManager.isActionActive(static_cast<int>(
+ Input::KEY_CHAT_MOD)))
+ {
+ ChatTab *const wTab = dynamic_cast<WhisperTab*>(tab);
+ if (wTab)
+ wTab->handleCommand("close", "");
+ }
+ else
+ {
+ ChatTab *const cTab = dynamic_cast<ChatTab*>(tab);
+ if (cTab)
+ viewport->showChatPopup(cTab);
+ }
}
}
}
diff --git a/src/gui/setupactiondata.h b/src/gui/setupactiondata.h
index 38815898c..b47abace7 100644
--- a/src/gui/setupactiondata.h
+++ b/src/gui/setupactiondata.h
@@ -1011,6 +1011,11 @@ static SetupActionData setupActionData5[] =
"",
},
{
+ N_("Chat modifier key"),
+ Input::KEY_CHAT_MOD,
+ "",
+ },
+ {
"",
Input::KEY_NO_VALUE,
""
diff --git a/src/keyboarddata.h b/src/keyboarddata.h
index 1a8d2f6da..980bf1eda 100644
--- a/src/keyboarddata.h
+++ b/src/keyboarddata.h
@@ -1943,6 +1943,13 @@ static const KeyData keyData[Input::KEY_TOTAL] = {
Input::GRP_DEFAULT,
&ActionManager::showWindows,
Input::KEY_NO_VALUE, 50,
+ COND_DEFAULT},
+ {"keyChatMod",
+ INPUT_KEYBOARD, SDLK_LSHIFT,
+ INPUT_UNKNOWN, Input::KEY_NO_VALUE,
+ Input::GRP_CHAT,
+ nullptr,
+ Input::KEY_NO_VALUE, 50,
COND_DEFAULT}
};
diff --git a/src/keydata.h b/src/keydata.h
index 8e06c5eb7..c5c0e0aad 100644
--- a/src/keydata.h
+++ b/src/keydata.h
@@ -340,6 +340,7 @@ namespace Input
KEY_STOP_SIT,
KEY_SHOW_KEYBOARD,
KEY_SHOW_WINDOWS,
+ KEY_CHAT_MOD,
KEY_TOTAL
};
} // namespace Input