| 272 | } |
| 273 | |
| 274 | void Client::updatePreservedKeys(Json::Value& msg) { |
| 275 | const auto& addPreservedKeyVal = msg["addPreservedKey"]; |
| 276 | if (addPreservedKeyVal.isArray()) { |
| 277 | // preserved keys |
| 278 | for (auto& key : addPreservedKeyVal) { |
| 279 | if (key.isObject()) { |
| 280 | UINT keyCode = key["keyCode"].asUInt(); |
| 281 | UINT modifiers = key["modifiers"].asUInt(); |
| 282 | UUID guid = { 0 }; |
| 283 | if (uuidFromString(key["guid"].asCString(), guid)) { |
| 284 | textService_->addPreservedKey(keyCode, modifiers, guid); |
| 285 | } |
| 286 | } |
| 287 | } |
| 288 | } |
| 289 | |
| 290 | const auto& removePreservedKeyVal = msg["removePreservedKey"]; |
| 291 | if (removePreservedKeyVal.isArray()) { |
| 292 | for (auto& item : removePreservedKeyVal) { |
| 293 | if (item.isString()) { |
| 294 | UUID guid = { 0 }; |
| 295 | if (uuidFromString(item.asCString(), guid)) { |
| 296 | textService_->removePreservedKey(guid); |
| 297 | } |
| 298 | } |
| 299 | } |
| 300 | } |
| 301 | } |
| 302 | |
| 303 | void Client::updateKeyboardStatus(Json::Value& msg) { |
| 304 | const auto& openKeyboardVal = msg["openKeyboard"]; |
nothing calls this directly
no test coverage detected