summaryrefslogtreecommitdiff
path: root/src/managers/KeybindManager.cpp
diff options
context:
space:
mode:
authorriChar <wxsychi@163.com>2023-01-08 23:35:24 +0800
committerGitHub <noreply@github.com>2023-01-08 16:35:24 +0100
commite5dcbf73d881178c7f9c6306d287ed610d6efea1 (patch)
treed157de8ddd40b44a6b42dddd7013a403731fb5ac /src/managers/KeybindManager.cpp
parent50e106f2e60785126331eaf2a9c43595a2a768d4 (diff)
Add "on" and "off" for the bind of switch (#1342)
Diffstat (limited to 'src/managers/KeybindManager.cpp')
-rw-r--r--src/managers/KeybindManager.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index f5b3e34b..cb2faf11 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -287,6 +287,14 @@ void CKeybindManager::onSwitchEvent(const std::string& switchName) {
handleKeybinds(0, "switch:" + switchName, 0, 0, true, 0);
}
+void CKeybindManager::onSwitchOnEvent(const std::string& switchName) {
+ handleKeybinds(0, "switch:on:" + switchName, 0, 0, true, 0);
+}
+
+void CKeybindManager::onSwitchOffEvent(const std::string& switchName) {
+ handleKeybinds(0, "switch:off:" + switchName, 0, 0, true, 0);
+}
+
int repeatKeyHandler(void* data) {
SKeybind** ppActiveKeybind = (SKeybind**)data;