summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/chat.cpp19
-rw-r--r--src/actions/chat.h1
2 files changed, 20 insertions, 0 deletions
diff --git a/src/actions/chat.cpp b/src/actions/chat.cpp
index d8743e06a..4f69b31b8 100644
--- a/src/actions/chat.cpp
+++ b/src/actions/chat.cpp
@@ -780,4 +780,23 @@ impHandler(sendMouseKey)
return true;
}
+impHandler(sendChars)
+{
+ if (!guiInput)
+ return false;
+
+ const std::string args = event.args;
+ if (args.empty())
+ return false;
+
+ const size_t sz = args.size();
+ for (size_t f = 0; f < sz; f ++)
+ {
+ guiInput->simulateKey(CAST_S32(args[f]),
+ InputAction::NO_VALUE);
+ }
+
+ return true;
+}
+
} // namespace Actions
diff --git a/src/actions/chat.h b/src/actions/chat.h
index 5d4f1c02d..0e3c362a7 100644
--- a/src/actions/chat.h
+++ b/src/actions/chat.h
@@ -64,6 +64,7 @@ namespace Actions
decHandler(translate);
decHandler(sendGuiKey);
decHandler(sendMouseKey);
+ decHandler(sendChars);
} // namespace Actions
#undef decHandler