| 205 | } |
| 206 | |
| 207 | static void InjectKeys(const std::vector<HotkeyType> &keys, int duration) |
| 208 | { |
| 209 | auto combo = keysToOBSKeycombo(keys); |
| 210 | if (obs_key_combination_is_empty(combo)) { |
| 211 | return; |
| 212 | } |
| 213 | // I am not sure why this is necessary |
| 214 | obs_hotkey_inject_event(combo, false); |
| 215 | |
| 216 | obs_hotkey_inject_event(combo, true); |
| 217 | std::this_thread::sleep_for(std::chrono::milliseconds(duration)); |
| 218 | obs_hotkey_inject_event(combo, false); |
| 219 | } |
| 220 | |
| 221 | static void addNamePrefix(std::string &name, obs_hotkey_t *hotkey) |
| 222 | { |
no test coverage detected