Add "on" and "off" for the bind of switch (#1342)

This commit is contained in:
riChar
2023-01-08 23:35:24 +08:00
committed by GitHub
parent 50e106f2e6
commit e5dcbf73d8
3 changed files with 23 additions and 0 deletions

View File

@@ -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;