summaryrefslogtreecommitdiff
path: root/src/input/inputmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/input/inputmanager.cpp')
-rw-r--r--src/input/inputmanager.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp
index 099e2b7fb..3a7f1be9c 100644
--- a/src/input/inputmanager.cpp
+++ b/src/input/inputmanager.cpp
@@ -752,6 +752,22 @@ bool InputManager::executeChatCommand(const std::string &cmd,
return false;
}
+bool InputManager::executeChatCommand(const int keyNum,
+ const std::string &args,
+ ChatTab *const tab)
+{
+ if (keyNum < 0 || keyNum >= InputAction::TOTAL)
+ return false;
+ ActionFuncPtr func = *(inputActionData[keyNum].action);
+ if (func)
+ {
+ InputEvent evt(args, tab, mMask);
+ func(evt);
+ return true;
+ }
+ return false;
+}
+
void InputManager::updateKeyActionMap(KeyToActionMap &actionMap,
KeyToIdMap &idMap,
KeyTimeMap &keyTimeMap,