* Convert all keycodes attached to a hotkey to a single string. If multiple * keycodes are attached to the hotkey they are split by a comma. * @param hotkey The keycodes of this hotkey need to be converted to a string. * @return A string representation of all keycodes. */
| 203 | * @return A string representation of all keycodes. |
| 204 | */ |
| 205 | std::string SaveKeycodes(const Hotkey &hotkey) |
| 206 | { |
| 207 | std::string str; |
| 208 | for (auto keycode : hotkey.keycodes) { |
| 209 | if (!str.empty()) str += ","; |
| 210 | str += KeycodeToString(keycode); |
| 211 | } |
| 212 | return str; |
| 213 | } |
| 214 | |
| 215 | /** |
| 216 | * Create a new Hotkey object with a single default keycode. |
no test coverage detected