Update Locale ID's for better readability

This commit is contained in:
_Neo_
2026-03-22 22:37:27 +02:00
parent a8c18a9853
commit ce07a2be68
5 changed files with 155 additions and 155 deletions

View File

@@ -47,7 +47,7 @@ If no json file exists for the specific part of the emulator you're working on,
} }
}, },
{ {
"ID": "KeyNumber9", "ID": "Key_Number9",
"Translations": { "Translations": {
"ar_SA": "٩", "ar_SA": "٩",
"en_US": "9", "en_US": "9",

View File

@@ -1,7 +1,7 @@
{ {
"Locales": [ "Locales": [
{ {
"ID": "KeyUnknown", "ID": "Key_Unknown",
"Translations": { "Translations": {
"ar_SA": "مجهول", "ar_SA": "مجهول",
"de_DE": "Unbekannt", "de_DE": "Unbekannt",
@@ -26,7 +26,7 @@
} }
}, },
{ {
"ID": "KeyShiftLeft", "ID": "Key_ShiftLeft",
"Translations": { "Translations": {
"ar_SA": "⇧ يسار", "ar_SA": "⇧ يسار",
"de_DE": "⇧ Links", "de_DE": "⇧ Links",
@@ -51,7 +51,7 @@
} }
}, },
{ {
"ID": "KeyShiftRight", "ID": "Key_ShiftRight",
"Translations": { "Translations": {
"ar_SA": "⇧ يمين", "ar_SA": "⇧ يمين",
"de_DE": "⇧ Rechts", "de_DE": "⇧ Rechts",
@@ -76,7 +76,7 @@
} }
}, },
{ {
"ID": "KeyControlLeft", "ID": "Key_ControlLeft",
"Translations": { "Translations": {
"ar_SA": "Ctrl الأيسر", "ar_SA": "Ctrl الأيسر",
"de_DE": "Ctrl Links", "de_DE": "Ctrl Links",
@@ -101,7 +101,7 @@
} }
}, },
{ {
"ID": "KeyMacControlLeft", "ID": "Key_Mac_ControlLeft",
"Translations": { "Translations": {
"ar_SA": "⌃ الأيسر", "ar_SA": "⌃ الأيسر",
"de_DE": "⌃ Links", "de_DE": "⌃ Links",
@@ -126,7 +126,7 @@
} }
}, },
{ {
"ID": "KeyControlRight", "ID": "Key_ControlRight",
"Translations": { "Translations": {
"ar_SA": "Ctrl الأيمن", "ar_SA": "Ctrl الأيمن",
"de_DE": "Ctrl Rechts", "de_DE": "Ctrl Rechts",
@@ -151,7 +151,7 @@
} }
}, },
{ {
"ID": "KeyMacControlRight", "ID": "Key_Mac_ControlRight",
"Translations": { "Translations": {
"ar_SA": "⌃ الأيمن", "ar_SA": "⌃ الأيمن",
"de_DE": "⌃ Rechts", "de_DE": "⌃ Rechts",
@@ -176,7 +176,7 @@
} }
}, },
{ {
"ID": "KeyAltLeft", "ID": "Key_AltLeft",
"Translations": { "Translations": {
"ar_SA": "Alt الأيسر", "ar_SA": "Alt الأيسر",
"de_DE": "Alt Links", "de_DE": "Alt Links",
@@ -201,7 +201,7 @@
} }
}, },
{ {
"ID": "KeyMacAltLeft", "ID": "Key_Mac_AltLeft",
"Translations": { "Translations": {
"ar_SA": "⌥ الأيسر", "ar_SA": "⌥ الأيسر",
"de_DE": "⌥ Links", "de_DE": "⌥ Links",
@@ -226,7 +226,7 @@
} }
}, },
{ {
"ID": "KeyAltRight", "ID": "Key_AltRight",
"Translations": { "Translations": {
"ar_SA": "Alt الأيمن", "ar_SA": "Alt الأيمن",
"de_DE": "Alt Rechts", "de_DE": "Alt Rechts",
@@ -251,7 +251,7 @@
} }
}, },
{ {
"ID": "KeyMacAltRight", "ID": "Key_Mac_AltRight",
"Translations": { "Translations": {
"ar_SA": "⌥ الأيمن", "ar_SA": "⌥ الأيمن",
"de_DE": "⌥ Rechts", "de_DE": "⌥ Rechts",
@@ -276,7 +276,7 @@
} }
}, },
{ {
"ID": "KeyWinLeft", "ID": "Key_WinLeft",
"Translations": { "Translations": {
"ar_SA": "⊞ الأيسر", "ar_SA": "⊞ الأيسر",
"de_DE": "⊞ Links", "de_DE": "⊞ Links",
@@ -301,7 +301,7 @@
} }
}, },
{ {
"ID": "KeyMacWinLeft", "ID": "Key_Mac_WinLeft",
"Translations": { "Translations": {
"ar_SA": "⌘ الأيسر", "ar_SA": "⌘ الأيسر",
"de_DE": "⌘ Links", "de_DE": "⌘ Links",
@@ -326,7 +326,7 @@
} }
}, },
{ {
"ID": "KeyWinRight", "ID": "Key_WinRight",
"Translations": { "Translations": {
"ar_SA": "⊞ الأيمن", "ar_SA": "⊞ الأيمن",
"de_DE": "⊞ Rechts", "de_DE": "⊞ Rechts",
@@ -351,7 +351,7 @@
} }
}, },
{ {
"ID": "KeyMacWinRight", "ID": "Key_Mac_WinRight",
"Translations": { "Translations": {
"ar_SA": "⌘ الأيمن", "ar_SA": "⌘ الأيمن",
"de_DE": "⌘ Rechts", "de_DE": "⌘ Rechts",
@@ -376,7 +376,7 @@
} }
}, },
{ {
"ID": "KeyUp", "ID": "Key_Up",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -401,7 +401,7 @@
} }
}, },
{ {
"ID": "KeyDown", "ID": "Key_Down",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -426,7 +426,7 @@
} }
}, },
{ {
"ID": "KeyLeft", "ID": "Key_Left",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -451,7 +451,7 @@
} }
}, },
{ {
"ID": "KeyRight", "ID": "Key_Right",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -476,7 +476,7 @@
} }
}, },
{ {
"ID": "KeyEnter", "ID": "Key_Enter",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -501,7 +501,7 @@
} }
}, },
{ {
"ID": "KeyEscape", "ID": "Key_Escape",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -526,7 +526,7 @@
} }
}, },
{ {
"ID": "KeySpace", "ID": "Key_Space",
"Translations": { "Translations": {
"ar_SA": "مسافة", "ar_SA": "مسافة",
"de_DE": "Leertaste", "de_DE": "Leertaste",
@@ -551,7 +551,7 @@
} }
}, },
{ {
"ID": "KeyTab", "ID": "Key_Tab",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -576,7 +576,7 @@
} }
}, },
{ {
"ID": "KeyBackSpace", "ID": "Key_BackSpace",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -601,7 +601,7 @@
} }
}, },
{ {
"ID": "KeyInsert", "ID": "Key_Insert",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -626,7 +626,7 @@
} }
}, },
{ {
"ID": "KeyDelete", "ID": "Key_Delete",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -651,7 +651,7 @@
} }
}, },
{ {
"ID": "KeyPageUp", "ID": "Key_PageUp",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -676,7 +676,7 @@
} }
}, },
{ {
"ID": "KeyPageDown", "ID": "Key_PageDown",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -701,7 +701,7 @@
} }
}, },
{ {
"ID": "KeyHome", "ID": "Key_Home",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -726,7 +726,7 @@
} }
}, },
{ {
"ID": "KeyEnd", "ID": "Key_End",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -751,7 +751,7 @@
} }
}, },
{ {
"ID": "KeyCapsLock", "ID": "Key_CapsLock",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -776,7 +776,7 @@
} }
}, },
{ {
"ID": "KeyScrollLock", "ID": "Key_ScrollLock",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -801,7 +801,7 @@
} }
}, },
{ {
"ID": "KeyPrintScreen", "ID": "Key_PrintScreen",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -826,7 +826,7 @@
} }
}, },
{ {
"ID": "KeyPause", "ID": "Key_Pause",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -851,7 +851,7 @@
} }
}, },
{ {
"ID": "KeyNumLock", "ID": "Key_NumLock",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -876,7 +876,7 @@
} }
}, },
{ {
"ID": "KeyClear", "ID": "Key_Clear",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -901,7 +901,7 @@
} }
}, },
{ {
"ID": "KeyKeypad0", "ID": "Key_Keypad0",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -926,7 +926,7 @@
} }
}, },
{ {
"ID": "KeyKeypad1", "ID": "Key_Keypad1",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -951,7 +951,7 @@
} }
}, },
{ {
"ID": "KeyKeypad2", "ID": "Key_Keypad2",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -976,7 +976,7 @@
} }
}, },
{ {
"ID": "KeyKeypad3", "ID": "Key_Keypad3",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -1001,7 +1001,7 @@
} }
}, },
{ {
"ID": "KeyKeypad4", "ID": "Key_Keypad4",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -1026,7 +1026,7 @@
} }
}, },
{ {
"ID": "KeyKeypad5", "ID": "Key_Keypad5",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -1051,7 +1051,7 @@
} }
}, },
{ {
"ID": "KeyKeypad6", "ID": "Key_Keypad6",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -1076,7 +1076,7 @@
} }
}, },
{ {
"ID": "KeyKeypad7", "ID": "Key_Keypad7",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -1101,7 +1101,7 @@
} }
}, },
{ {
"ID": "KeyKeypad8", "ID": "Key_Keypad8",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -1126,7 +1126,7 @@
} }
}, },
{ {
"ID": "KeyKeypad9", "ID": "Key_Keypad9",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -1151,7 +1151,7 @@
} }
}, },
{ {
"ID": "KeyKeypadDivide", "ID": "Key_KeypadDivide",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -1176,7 +1176,7 @@
} }
}, },
{ {
"ID": "KeyKeypadMultiply", "ID": "Key_KeypadMultiply",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -1201,7 +1201,7 @@
} }
}, },
{ {
"ID": "KeyKeypadSubtract", "ID": "Key_KeypadSubtract",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -1226,7 +1226,7 @@
} }
}, },
{ {
"ID": "KeyKeypadAdd", "ID": "Key_KeypadAdd",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -1251,7 +1251,7 @@
} }
}, },
{ {
"ID": "KeyKeypadDecimal", "ID": "Key_KeypadDecimal",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -1276,7 +1276,7 @@
} }
}, },
{ {
"ID": "KeyKeypadEnter", "ID": "Key_KeypadEnter",
"Translations": { "Translations": {
"ar_SA": null, "ar_SA": null,
"de_DE": null, "de_DE": null,
@@ -1301,7 +1301,7 @@
} }
}, },
{ {
"ID": "KeyNumber0", "ID": "Key_Number0",
"Translations": { "Translations": {
"ar_SA": "٠", "ar_SA": "٠",
"de_DE": "", "de_DE": "",
@@ -1326,7 +1326,7 @@
} }
}, },
{ {
"ID": "KeyNumber1", "ID": "Key_Number1",
"Translations": { "Translations": {
"ar_SA": "١", "ar_SA": "١",
"de_DE": "", "de_DE": "",
@@ -1351,7 +1351,7 @@
} }
}, },
{ {
"ID": "KeyNumber2", "ID": "Key_Number2",
"Translations": { "Translations": {
"ar_SA": "٢", "ar_SA": "٢",
"de_DE": "", "de_DE": "",
@@ -1376,7 +1376,7 @@
} }
}, },
{ {
"ID": "KeyNumber3", "ID": "Key_Number3",
"Translations": { "Translations": {
"ar_SA": "٣", "ar_SA": "٣",
"de_DE": "", "de_DE": "",
@@ -1401,7 +1401,7 @@
} }
}, },
{ {
"ID": "KeyNumber4", "ID": "Key_Number4",
"Translations": { "Translations": {
"ar_SA": "٤", "ar_SA": "٤",
"de_DE": "", "de_DE": "",
@@ -1426,7 +1426,7 @@
} }
}, },
{ {
"ID": "KeyNumber5", "ID": "Key_Number5",
"Translations": { "Translations": {
"ar_SA": "٥", "ar_SA": "٥",
"de_DE": "", "de_DE": "",
@@ -1451,7 +1451,7 @@
} }
}, },
{ {
"ID": "KeyNumber6", "ID": "Key_Number6",
"Translations": { "Translations": {
"ar_SA": "٦", "ar_SA": "٦",
"de_DE": "", "de_DE": "",
@@ -1476,7 +1476,7 @@
} }
}, },
{ {
"ID": "KeyNumber7", "ID": "Key_Number7",
"Translations": { "Translations": {
"ar_SA": "٧", "ar_SA": "٧",
"de_DE": "", "de_DE": "",
@@ -1501,7 +1501,7 @@
} }
}, },
{ {
"ID": "KeyNumber8", "ID": "Key_Number8",
"Translations": { "Translations": {
"ar_SA": "٨", "ar_SA": "٨",
"de_DE": "", "de_DE": "",
@@ -1526,7 +1526,7 @@
} }
}, },
{ {
"ID": "KeyNumber9", "ID": "Key_Number9",
"Translations": { "Translations": {
"ar_SA": "٩", "ar_SA": "٩",
"de_DE": "", "de_DE": "",
@@ -1551,7 +1551,7 @@
} }
}, },
{ {
"ID": "KeyTilde", "ID": "Key_Tilde",
"Translations": { "Translations": {
"ar_SA": "", "ar_SA": "",
"de_DE": "", "de_DE": "",
@@ -1576,7 +1576,7 @@
} }
}, },
{ {
"ID": "KeyGrave", "ID": "Key_Grave",
"Translations": { "Translations": {
"ar_SA": "", "ar_SA": "",
"de_DE": "", "de_DE": "",
@@ -1601,7 +1601,7 @@
} }
}, },
{ {
"ID": "KeyMinus", "ID": "Key_Minus",
"Translations": { "Translations": {
"ar_SA": "", "ar_SA": "",
"de_DE": "", "de_DE": "",
@@ -1626,7 +1626,7 @@
} }
}, },
{ {
"ID": "KeyPlus", "ID": "Key_Plus",
"Translations": { "Translations": {
"ar_SA": "", "ar_SA": "",
"de_DE": "", "de_DE": "",
@@ -1651,7 +1651,7 @@
} }
}, },
{ {
"ID": "KeyBracketLeft", "ID": "Key_BracketLeft",
"Translations": { "Translations": {
"ar_SA": "", "ar_SA": "",
"de_DE": "", "de_DE": "",
@@ -1676,7 +1676,7 @@
} }
}, },
{ {
"ID": "KeyBracketRight", "ID": "Key_BracketRight",
"Translations": { "Translations": {
"ar_SA": "", "ar_SA": "",
"de_DE": "", "de_DE": "",
@@ -1701,7 +1701,7 @@
} }
}, },
{ {
"ID": "KeySemicolon", "ID": "Key_Semicolon",
"Translations": { "Translations": {
"ar_SA": "", "ar_SA": "",
"de_DE": "", "de_DE": "",
@@ -1726,7 +1726,7 @@
} }
}, },
{ {
"ID": "KeyQuote", "ID": "Key_Quote",
"Translations": { "Translations": {
"ar_SA": "", "ar_SA": "",
"de_DE": "", "de_DE": "",
@@ -1751,7 +1751,7 @@
} }
}, },
{ {
"ID": "KeyComma", "ID": "Key_Comma",
"Translations": { "Translations": {
"ar_SA": "", "ar_SA": "",
"de_DE": "", "de_DE": "",
@@ -1776,7 +1776,7 @@
} }
}, },
{ {
"ID": "KeyPeriod", "ID": "Key_Period",
"Translations": { "Translations": {
"ar_SA": "", "ar_SA": "",
"de_DE": "", "de_DE": "",
@@ -1801,7 +1801,7 @@
} }
}, },
{ {
"ID": "KeySlash", "ID": "Key_Slash",
"Translations": { "Translations": {
"ar_SA": "", "ar_SA": "",
"de_DE": "", "de_DE": "",
@@ -1826,7 +1826,7 @@
} }
}, },
{ {
"ID": "KeyBackSlash", "ID": "Key_BackSlash",
"Translations": { "Translations": {
"ar_SA": "", "ar_SA": "",
"de_DE": "", "de_DE": "",
@@ -1851,7 +1851,7 @@
} }
}, },
{ {
"ID": "KeyUnbound", "ID": "Key_Unbound",
"Translations": { "Translations": {
"ar_SA": "غير مرتبط", "ar_SA": "غير مرتبط",
"de_DE": "Ungebunden", "de_DE": "Ungebunden",
@@ -1876,7 +1876,7 @@
} }
}, },
{ {
"ID": "AllKeyboards", "ID": "InputType_Keyboard",
"Translations": { "Translations": {
"ar_SA": "لوحة المفاتيح", "ar_SA": "لوحة المفاتيح",
"de_DE": "Tastatur", "de_DE": "Tastatur",

View File

@@ -67,7 +67,7 @@ namespace Ryujinx.Ava.Input
return null; return null;
} }
return new AvaloniaKeyboard(this, _keyboardIdentifers[0], LocaleManager.Instance[LocaleKeys.KeyboardLayout_AllKeyboards], mode); return new AvaloniaKeyboard(this, _keyboardIdentifers[0], LocaleManager.Instance[LocaleKeys.KeyboardLayout_InputType_Keyboard], mode);
} }
public IEnumerable<IGamepad> GetGamepads() => [GetGamepad("0")]; public IEnumerable<IGamepad> GetGamepads() => [GetGamepad("0")];

View File

@@ -38,14 +38,14 @@ namespace Ryujinx.Ava.UI.Helpers
{ GamepadInputId.SingleRightTrigger0, LocaleKeys.GamepadSingleRightTrigger0}, { GamepadInputId.SingleRightTrigger0, LocaleKeys.GamepadSingleRightTrigger0},
{ GamepadInputId.SingleLeftTrigger1, LocaleKeys.GamepadSingleLeftTrigger1}, { GamepadInputId.SingleLeftTrigger1, LocaleKeys.GamepadSingleLeftTrigger1},
{ GamepadInputId.SingleRightTrigger1, LocaleKeys.GamepadSingleRightTrigger1}, { GamepadInputId.SingleRightTrigger1, LocaleKeys.GamepadSingleRightTrigger1},
{ GamepadInputId.Unbound, LocaleKeys.KeyboardLayout_KeyUnbound}, { GamepadInputId.Unbound, LocaleKeys.KeyboardLayout_Key_Unbound},
}; };
private static readonly Dictionary<StickInputId, LocaleKeys> _stickInputIdMap = new() private static readonly Dictionary<StickInputId, LocaleKeys> _stickInputIdMap = new()
{ {
{ StickInputId.Left, LocaleKeys.StickLeft}, { StickInputId.Left, LocaleKeys.StickLeft},
{ StickInputId.Right, LocaleKeys.StickRight}, { StickInputId.Right, LocaleKeys.StickRight},
{ StickInputId.Unbound, LocaleKeys.KeyboardLayout_KeyUnbound}, { StickInputId.Unbound, LocaleKeys.KeyboardLayout_Key_Unbound},
}; };
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) public object Convert(object value, Type targetType, object parameter, CultureInfo culture)

View File

@@ -10,79 +10,79 @@ namespace Ryujinx.Ava.UI.Helpers
{ {
private static readonly Dictionary<InputKey, LocaleKeys> _sharedLocalizedKeysMap = new() private static readonly Dictionary<InputKey, LocaleKeys> _sharedLocalizedKeysMap = new()
{ {
[InputKey.Unknown] = LocaleKeys.KeyboardLayout_KeyUnknown, [InputKey.Unknown] = LocaleKeys.KeyboardLayout_Key_Unknown,
[InputKey.ShiftLeft] = LocaleKeys.KeyboardLayout_KeyShiftLeft, [InputKey.ShiftLeft] = LocaleKeys.KeyboardLayout_Key_ShiftLeft,
[InputKey.ShiftRight] = LocaleKeys.KeyboardLayout_KeyShiftRight, [InputKey.ShiftRight] = LocaleKeys.KeyboardLayout_Key_ShiftRight,
[InputKey.ControlLeft] = LocaleKeys.KeyboardLayout_KeyControlLeft, [InputKey.ControlLeft] = LocaleKeys.KeyboardLayout_Key_ControlLeft,
[InputKey.ControlRight] = LocaleKeys.KeyboardLayout_KeyControlRight, [InputKey.ControlRight] = LocaleKeys.KeyboardLayout_Key_ControlRight,
[InputKey.AltLeft] = LocaleKeys.KeyboardLayout_KeyAltLeft, [InputKey.AltLeft] = LocaleKeys.KeyboardLayout_Key_AltLeft,
[InputKey.AltRight] = LocaleKeys.KeyboardLayout_KeyAltRight, [InputKey.AltRight] = LocaleKeys.KeyboardLayout_Key_AltRight,
[InputKey.WinLeft] = LocaleKeys.KeyboardLayout_KeyWinLeft, [InputKey.WinLeft] = LocaleKeys.KeyboardLayout_Key_WinLeft,
[InputKey.WinRight] = LocaleKeys.KeyboardLayout_KeyWinRight, [InputKey.WinRight] = LocaleKeys.KeyboardLayout_Key_WinRight,
[InputKey.Up] = LocaleKeys.KeyboardLayout_KeyUp, [InputKey.Up] = LocaleKeys.KeyboardLayout_Key_Up,
[InputKey.Down] = LocaleKeys.KeyboardLayout_KeyDown, [InputKey.Down] = LocaleKeys.KeyboardLayout_Key_Down,
[InputKey.Left] = LocaleKeys.KeyboardLayout_KeyLeft, [InputKey.Left] = LocaleKeys.KeyboardLayout_Key_Left,
[InputKey.Right] = LocaleKeys.KeyboardLayout_KeyRight, [InputKey.Right] = LocaleKeys.KeyboardLayout_Key_Right,
[InputKey.Enter] = LocaleKeys.KeyboardLayout_KeyEnter, [InputKey.Enter] = LocaleKeys.KeyboardLayout_Key_Enter,
[InputKey.Escape] = LocaleKeys.KeyboardLayout_KeyEscape, [InputKey.Escape] = LocaleKeys.KeyboardLayout_Key_Escape,
[InputKey.Space] = LocaleKeys.KeyboardLayout_KeySpace, [InputKey.Space] = LocaleKeys.KeyboardLayout_Key_Space,
[InputKey.Tab] = LocaleKeys.KeyboardLayout_KeyTab, [InputKey.Tab] = LocaleKeys.KeyboardLayout_Key_Tab,
[InputKey.BackSpace] = LocaleKeys.KeyboardLayout_KeyBackSpace, [InputKey.BackSpace] = LocaleKeys.KeyboardLayout_Key_BackSpace,
[InputKey.Insert] = LocaleKeys.KeyboardLayout_KeyInsert, [InputKey.Insert] = LocaleKeys.KeyboardLayout_Key_Insert,
[InputKey.Delete] = LocaleKeys.KeyboardLayout_KeyDelete, [InputKey.Delete] = LocaleKeys.KeyboardLayout_Key_Delete,
[InputKey.PageUp] = LocaleKeys.KeyboardLayout_KeyPageUp, [InputKey.PageUp] = LocaleKeys.KeyboardLayout_Key_PageUp,
[InputKey.PageDown] = LocaleKeys.KeyboardLayout_KeyPageDown, [InputKey.PageDown] = LocaleKeys.KeyboardLayout_Key_PageDown,
[InputKey.Home] = LocaleKeys.KeyboardLayout_KeyHome, [InputKey.Home] = LocaleKeys.KeyboardLayout_Key_Home,
[InputKey.End] = LocaleKeys.KeyboardLayout_KeyEnd, [InputKey.End] = LocaleKeys.KeyboardLayout_Key_End,
[InputKey.CapsLock] = LocaleKeys.KeyboardLayout_KeyCapsLock, [InputKey.CapsLock] = LocaleKeys.KeyboardLayout_Key_CapsLock,
[InputKey.ScrollLock] = LocaleKeys.KeyboardLayout_KeyScrollLock, [InputKey.ScrollLock] = LocaleKeys.KeyboardLayout_Key_ScrollLock,
[InputKey.PrintScreen] = LocaleKeys.KeyboardLayout_KeyPrintScreen, [InputKey.PrintScreen] = LocaleKeys.KeyboardLayout_Key_PrintScreen,
[InputKey.Pause] = LocaleKeys.KeyboardLayout_KeyPause, [InputKey.Pause] = LocaleKeys.KeyboardLayout_Key_Pause,
[InputKey.NumLock] = LocaleKeys.KeyboardLayout_KeyNumLock, [InputKey.NumLock] = LocaleKeys.KeyboardLayout_Key_NumLock,
[InputKey.Clear] = LocaleKeys.KeyboardLayout_KeyClear, [InputKey.Clear] = LocaleKeys.KeyboardLayout_Key_Clear,
[InputKey.Keypad0] = LocaleKeys.KeyboardLayout_KeyKeypad0, [InputKey.Keypad0] = LocaleKeys.KeyboardLayout_Key_Keypad0,
[InputKey.Keypad1] = LocaleKeys.KeyboardLayout_KeyKeypad1, [InputKey.Keypad1] = LocaleKeys.KeyboardLayout_Key_Keypad1,
[InputKey.Keypad2] = LocaleKeys.KeyboardLayout_KeyKeypad2, [InputKey.Keypad2] = LocaleKeys.KeyboardLayout_Key_Keypad2,
[InputKey.Keypad3] = LocaleKeys.KeyboardLayout_KeyKeypad3, [InputKey.Keypad3] = LocaleKeys.KeyboardLayout_Key_Keypad3,
[InputKey.Keypad4] = LocaleKeys.KeyboardLayout_KeyKeypad4, [InputKey.Keypad4] = LocaleKeys.KeyboardLayout_Key_Keypad4,
[InputKey.Keypad5] = LocaleKeys.KeyboardLayout_KeyKeypad5, [InputKey.Keypad5] = LocaleKeys.KeyboardLayout_Key_Keypad5,
[InputKey.Keypad6] = LocaleKeys.KeyboardLayout_KeyKeypad6, [InputKey.Keypad6] = LocaleKeys.KeyboardLayout_Key_Keypad6,
[InputKey.Keypad7] = LocaleKeys.KeyboardLayout_KeyKeypad7, [InputKey.Keypad7] = LocaleKeys.KeyboardLayout_Key_Keypad7,
[InputKey.Keypad8] = LocaleKeys.KeyboardLayout_KeyKeypad8, [InputKey.Keypad8] = LocaleKeys.KeyboardLayout_Key_Keypad8,
[InputKey.Keypad9] = LocaleKeys.KeyboardLayout_KeyKeypad9, [InputKey.Keypad9] = LocaleKeys.KeyboardLayout_Key_Keypad9,
[InputKey.KeypadDivide] = LocaleKeys.KeyboardLayout_KeyKeypadDivide, [InputKey.KeypadDivide] = LocaleKeys.KeyboardLayout_Key_KeypadDivide,
[InputKey.KeypadMultiply] = LocaleKeys.KeyboardLayout_KeyKeypadMultiply, [InputKey.KeypadMultiply] = LocaleKeys.KeyboardLayout_Key_KeypadMultiply,
[InputKey.KeypadSubtract] = LocaleKeys.KeyboardLayout_KeyKeypadSubtract, [InputKey.KeypadSubtract] = LocaleKeys.KeyboardLayout_Key_KeypadSubtract,
[InputKey.KeypadAdd] = LocaleKeys.KeyboardLayout_KeyKeypadAdd, [InputKey.KeypadAdd] = LocaleKeys.KeyboardLayout_Key_KeypadAdd,
[InputKey.KeypadDecimal] = LocaleKeys.KeyboardLayout_KeyKeypadDecimal, [InputKey.KeypadDecimal] = LocaleKeys.KeyboardLayout_Key_KeypadDecimal,
[InputKey.KeypadEnter] = LocaleKeys.KeyboardLayout_KeyKeypadEnter, [InputKey.KeypadEnter] = LocaleKeys.KeyboardLayout_Key_KeypadEnter,
[InputKey.Unbound] = LocaleKeys.KeyboardLayout_KeyUnbound, [InputKey.Unbound] = LocaleKeys.KeyboardLayout_Key_Unbound,
}; };
private static readonly Dictionary<InputKey, LocaleKeys> _semanticPrintableKeysMap = new() private static readonly Dictionary<InputKey, LocaleKeys> _semanticPrintableKeysMap = new()
{ {
[InputKey.Number0] = LocaleKeys.KeyboardLayout_KeyNumber0, [InputKey.Number0] = LocaleKeys.KeyboardLayout_Key_Number0,
[InputKey.Number1] = LocaleKeys.KeyboardLayout_KeyNumber1, [InputKey.Number1] = LocaleKeys.KeyboardLayout_Key_Number1,
[InputKey.Number2] = LocaleKeys.KeyboardLayout_KeyNumber2, [InputKey.Number2] = LocaleKeys.KeyboardLayout_Key_Number2,
[InputKey.Number3] = LocaleKeys.KeyboardLayout_KeyNumber3, [InputKey.Number3] = LocaleKeys.KeyboardLayout_Key_Number3,
[InputKey.Number4] = LocaleKeys.KeyboardLayout_KeyNumber4, [InputKey.Number4] = LocaleKeys.KeyboardLayout_Key_Number4,
[InputKey.Number5] = LocaleKeys.KeyboardLayout_KeyNumber5, [InputKey.Number5] = LocaleKeys.KeyboardLayout_Key_Number5,
[InputKey.Number6] = LocaleKeys.KeyboardLayout_KeyNumber6, [InputKey.Number6] = LocaleKeys.KeyboardLayout_Key_Number6,
[InputKey.Number7] = LocaleKeys.KeyboardLayout_KeyNumber7, [InputKey.Number7] = LocaleKeys.KeyboardLayout_Key_Number7,
[InputKey.Number8] = LocaleKeys.KeyboardLayout_KeyNumber8, [InputKey.Number8] = LocaleKeys.KeyboardLayout_Key_Number8,
[InputKey.Number9] = LocaleKeys.KeyboardLayout_KeyNumber9, [InputKey.Number9] = LocaleKeys.KeyboardLayout_Key_Number9,
[InputKey.Tilde] = LocaleKeys.KeyboardLayout_KeyTilde, [InputKey.Tilde] = LocaleKeys.KeyboardLayout_Key_Tilde,
[InputKey.Grave] = LocaleKeys.KeyboardLayout_KeyGrave, [InputKey.Grave] = LocaleKeys.KeyboardLayout_Key_Grave,
[InputKey.Minus] = LocaleKeys.KeyboardLayout_KeyMinus, [InputKey.Minus] = LocaleKeys.KeyboardLayout_Key_Minus,
[InputKey.Plus] = LocaleKeys.KeyboardLayout_KeyPlus, [InputKey.Plus] = LocaleKeys.KeyboardLayout_Key_Plus,
[InputKey.BracketLeft] = LocaleKeys.KeyboardLayout_KeyBracketLeft, [InputKey.BracketLeft] = LocaleKeys.KeyboardLayout_Key_BracketLeft,
[InputKey.BracketRight] = LocaleKeys.KeyboardLayout_KeyBracketRight, [InputKey.BracketRight] = LocaleKeys.KeyboardLayout_Key_BracketRight,
[InputKey.Semicolon] = LocaleKeys.KeyboardLayout_KeySemicolon, [InputKey.Semicolon] = LocaleKeys.KeyboardLayout_Key_Semicolon,
[InputKey.Quote] = LocaleKeys.KeyboardLayout_KeyQuote, [InputKey.Quote] = LocaleKeys.KeyboardLayout_Key_Quote,
[InputKey.Comma] = LocaleKeys.KeyboardLayout_KeyComma, [InputKey.Comma] = LocaleKeys.KeyboardLayout_Key_Comma,
[InputKey.Period] = LocaleKeys.KeyboardLayout_KeyPeriod, [InputKey.Period] = LocaleKeys.KeyboardLayout_Key_Period,
[InputKey.Slash] = LocaleKeys.KeyboardLayout_KeySlash, [InputKey.Slash] = LocaleKeys.KeyboardLayout_Key_Slash,
[InputKey.BackSlash] = LocaleKeys.KeyboardLayout_KeyBackSlash, [InputKey.BackSlash] = LocaleKeys.KeyboardLayout_Key_BackSlash,
}; };
public static bool TryGetSemanticLabel(InputKey key, out string label) public static bool TryGetSemanticLabel(InputKey key, out string label)
@@ -126,12 +126,12 @@ namespace Ryujinx.Ava.UI.Helpers
{ {
localeKey = localeKey switch localeKey = localeKey switch
{ {
LocaleKeys.KeyboardLayout_KeyControlLeft => LocaleKeys.KeyboardLayout_KeyMacControlLeft, LocaleKeys.KeyboardLayout_Key_ControlLeft => LocaleKeys.KeyboardLayout_Key_Mac_ControlLeft,
LocaleKeys.KeyboardLayout_KeyControlRight => LocaleKeys.KeyboardLayout_KeyMacControlRight, LocaleKeys.KeyboardLayout_Key_ControlRight => LocaleKeys.KeyboardLayout_Key_Mac_ControlRight,
LocaleKeys.KeyboardLayout_KeyAltLeft => LocaleKeys.KeyboardLayout_KeyMacAltLeft, LocaleKeys.KeyboardLayout_Key_AltLeft => LocaleKeys.KeyboardLayout_Key_Mac_AltLeft,
LocaleKeys.KeyboardLayout_KeyAltRight => LocaleKeys.KeyboardLayout_KeyMacAltRight, LocaleKeys.KeyboardLayout_Key_AltRight => LocaleKeys.KeyboardLayout_Key_Mac_AltRight,
LocaleKeys.KeyboardLayout_KeyWinLeft => LocaleKeys.KeyboardLayout_KeyMacWinLeft, LocaleKeys.KeyboardLayout_Key_WinLeft => LocaleKeys.KeyboardLayout_Key_Mac_WinLeft,
LocaleKeys.KeyboardLayout_KeyWinRight => LocaleKeys.KeyboardLayout_KeyMacWinRight, LocaleKeys.KeyboardLayout_Key_WinRight => LocaleKeys.KeyboardLayout_Key_Mac_WinRight,
_ => localeKey _ => localeKey
}; };
} }