| 332 | |
| 333 | template <size_t N> |
| 334 | constexpr std::optional<UINT> FindInKeyMap( |
| 335 | std::wstring_view key, |
| 336 | const std::pair<std::wstring_view, UINT> (&map)[N]) { |
| 337 | for (const auto& [name, code] : map) { |
| 338 | if (EqualsIgnoreCase(key, name)) |
| 339 | return code; |
| 340 | } |
| 341 | return std::nullopt; |
| 342 | } |
| 343 | |
| 344 | // Parse function key (F1-F24) |
| 345 | std::optional<UINT> ParseFunctionKey(std::wstring_view key) { |
no test coverage detected