| 508 | {Qt::Key_CameraFocus, "CameraFocus", nullptr}}; |
| 509 | |
| 510 | std::optional<u32> InputManager::ConvertHostKeyboardStringToCode(const std::string_view str) |
| 511 | { |
| 512 | std::string_view compare_name = str; |
| 513 | u32 modifier_bits = 0; |
| 514 | if (compare_name.starts_with("Numpad")) |
| 515 | { |
| 516 | compare_name = compare_name.substr(6); |
| 517 | modifier_bits |= Qt::KeypadModifier; |
| 518 | } |
| 519 | |
| 520 | for (const KeyCodeName& name : s_qt_key_names) |
| 521 | { |
| 522 | if (compare_name == name.name) |
| 523 | return static_cast<u32>(name.code) | modifier_bits; |
| 524 | } |
| 525 | |
| 526 | return std::nullopt; |
| 527 | } |
| 528 | |
| 529 | std::optional<std::string> InputManager::ConvertHostKeyboardCodeToString(u32 code) |
| 530 | { |
nothing calls this directly
no test coverage detected