| 265 | } |
| 266 | |
| 267 | bool InputManager::ParseBindingAndGetSource(const std::string_view binding, InputBindingKey* key, InputSource** source) |
| 268 | { |
| 269 | std::string_view source_string, sub_binding; |
| 270 | if (!SplitBinding(binding, &source_string, &sub_binding)) |
| 271 | return false; |
| 272 | |
| 273 | for (u32 i = FIRST_EXTERNAL_INPUT_SOURCE; i < LAST_EXTERNAL_INPUT_SOURCE; i++) |
| 274 | { |
| 275 | if (s_input_sources[i]->IsInitialized()) |
| 276 | { |
| 277 | std::optional<InputBindingKey> parsed_key = s_input_sources[i]->ParseKeyString(source_string, sub_binding); |
| 278 | if (parsed_key.has_value()) |
| 279 | { |
| 280 | *key = parsed_key.value(); |
| 281 | *source = s_input_sources[i].get(); |
| 282 | return true; |
| 283 | } |
| 284 | } |
| 285 | } |
| 286 | |
| 287 | return false; |
| 288 | } |
| 289 | |
| 290 | TinyString InputManager::ConvertKeyboardKeyToString(InputBindingKey key, bool display) |
| 291 | { |
nothing calls this directly
no test coverage detected