diff --git a/native/Avalonia.Native/src/OSX/KeyTransform.mm b/native/Avalonia.Native/src/OSX/KeyTransform.mm index c9ec857a9a8..ba3d809dd91 100644 --- a/native/Avalonia.Native/src/OSX/KeyTransform.mm +++ b/native/Avalonia.Native/src/OSX/KeyTransform.mm @@ -198,7 +198,7 @@ //{ , AvnPhysicalKeyUndo, 0 } }; -std::unordered_map virtualKeyFromChar = +std::unordered_map virtualKeyFromChar = { // Alphabetic keys { 'A', AvnKeyA }, @@ -339,9 +339,9 @@ static PhysicalKeyArray BuildPhysicalKeyFromScanCode() PhysicalKeyArray physicalKeyFromScanCode = BuildPhysicalKeyFromScanCode(); -static std::unordered_map BuildQwertyVirtualKeyFromPhysicalKey() +static std::unordered_map> BuildQwertyVirtualKeyFromPhysicalKey() { - std::unordered_map result; + std::unordered_map> result; result.reserve(sizeof(keyInfos) / sizeof(keyInfos[0])); for (auto& keyInfo : keyInfos) @@ -352,11 +352,11 @@ static PhysicalKeyArray BuildPhysicalKeyFromScanCode() return result; } -std::unordered_map qwertyVirtualKeyFromPhysicalKey = BuildQwertyVirtualKeyFromPhysicalKey(); +std::unordered_map> qwertyVirtualKeyFromPhysicalKey = BuildQwertyVirtualKeyFromPhysicalKey(); -static std::unordered_map BuildMenuCharFromVirtualKey() +static std::unordered_map> BuildMenuCharFromVirtualKey() { - std::unordered_map result; + std::unordered_map> result; result.reserve(100); for (auto& keyInfo : keyInfos) @@ -368,7 +368,7 @@ static PhysicalKeyArray BuildPhysicalKeyFromScanCode() return result; } -std::unordered_map menuCharFromVirtualKey = BuildMenuCharFromVirtualKey(); +std::unordered_map> menuCharFromVirtualKey = BuildMenuCharFromVirtualKey(); static bool IsNumpadOrNumericKey(AvnPhysicalKey physicalKey) {