From e5dcbf73d881178c7f9c6306d287ed610d6efea1 Mon Sep 17 00:00:00 2001 From: riChar Date: Sun, 8 Jan 2023 23:35:24 +0800 Subject: Add "on" and "off" for the bind of switch (#1342) --- src/managers/KeybindManager.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/managers/KeybindManager.cpp') 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; -- cgit v1.2.3