diff --git a/assets/Locales.md b/assets/Locales.md index 39b7e4d46..d5a9a6850 100644 --- a/assets/Locales.md +++ b/assets/Locales.md @@ -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": { "ar_SA": "٩", "en_US": "9", diff --git a/assets/Locales/KeyboardLayout.json b/assets/Locales/KeyboardLayout.json index 6f66a663a..9236a79ab 100644 --- a/assets/Locales/KeyboardLayout.json +++ b/assets/Locales/KeyboardLayout.json @@ -1,7 +1,7 @@ { "Locales": [ { - "ID": "KeyUnknown", + "ID": "Key_Unknown", "Translations": { "ar_SA": "مجهول", "de_DE": "Unbekannt", @@ -26,7 +26,7 @@ } }, { - "ID": "KeyShiftLeft", + "ID": "Key_ShiftLeft", "Translations": { "ar_SA": "⇧ يسار", "de_DE": "⇧ Links", @@ -51,7 +51,7 @@ } }, { - "ID": "KeyShiftRight", + "ID": "Key_ShiftRight", "Translations": { "ar_SA": "⇧ يمين", "de_DE": "⇧ Rechts", @@ -76,7 +76,7 @@ } }, { - "ID": "KeyControlLeft", + "ID": "Key_ControlLeft", "Translations": { "ar_SA": "Ctrl الأيسر", "de_DE": "Ctrl Links", @@ -101,7 +101,7 @@ } }, { - "ID": "KeyMacControlLeft", + "ID": "Key_Mac_ControlLeft", "Translations": { "ar_SA": "⌃ الأيسر", "de_DE": "⌃ Links", @@ -126,7 +126,7 @@ } }, { - "ID": "KeyControlRight", + "ID": "Key_ControlRight", "Translations": { "ar_SA": "Ctrl الأيمن", "de_DE": "Ctrl Rechts", @@ -151,7 +151,7 @@ } }, { - "ID": "KeyMacControlRight", + "ID": "Key_Mac_ControlRight", "Translations": { "ar_SA": "⌃ الأيمن", "de_DE": "⌃ Rechts", @@ -176,7 +176,7 @@ } }, { - "ID": "KeyAltLeft", + "ID": "Key_AltLeft", "Translations": { "ar_SA": "Alt الأيسر", "de_DE": "Alt Links", @@ -201,7 +201,7 @@ } }, { - "ID": "KeyMacAltLeft", + "ID": "Key_Mac_AltLeft", "Translations": { "ar_SA": "⌥ الأيسر", "de_DE": "⌥ Links", @@ -226,7 +226,7 @@ } }, { - "ID": "KeyAltRight", + "ID": "Key_AltRight", "Translations": { "ar_SA": "Alt الأيمن", "de_DE": "Alt Rechts", @@ -251,7 +251,7 @@ } }, { - "ID": "KeyMacAltRight", + "ID": "Key_Mac_AltRight", "Translations": { "ar_SA": "⌥ الأيمن", "de_DE": "⌥ Rechts", @@ -276,7 +276,7 @@ } }, { - "ID": "KeyWinLeft", + "ID": "Key_WinLeft", "Translations": { "ar_SA": "⊞ الأيسر", "de_DE": "⊞ Links", @@ -301,7 +301,7 @@ } }, { - "ID": "KeyMacWinLeft", + "ID": "Key_Mac_WinLeft", "Translations": { "ar_SA": "⌘ الأيسر", "de_DE": "⌘ Links", @@ -326,7 +326,7 @@ } }, { - "ID": "KeyWinRight", + "ID": "Key_WinRight", "Translations": { "ar_SA": "⊞ الأيمن", "de_DE": "⊞ Rechts", @@ -351,7 +351,7 @@ } }, { - "ID": "KeyMacWinRight", + "ID": "Key_Mac_WinRight", "Translations": { "ar_SA": "⌘ الأيمن", "de_DE": "⌘ Rechts", @@ -376,7 +376,7 @@ } }, { - "ID": "KeyUp", + "ID": "Key_Up", "Translations": { "ar_SA": null, "de_DE": null, @@ -401,7 +401,7 @@ } }, { - "ID": "KeyDown", + "ID": "Key_Down", "Translations": { "ar_SA": null, "de_DE": null, @@ -426,7 +426,7 @@ } }, { - "ID": "KeyLeft", + "ID": "Key_Left", "Translations": { "ar_SA": null, "de_DE": null, @@ -451,7 +451,7 @@ } }, { - "ID": "KeyRight", + "ID": "Key_Right", "Translations": { "ar_SA": null, "de_DE": null, @@ -476,7 +476,7 @@ } }, { - "ID": "KeyEnter", + "ID": "Key_Enter", "Translations": { "ar_SA": null, "de_DE": null, @@ -501,7 +501,7 @@ } }, { - "ID": "KeyEscape", + "ID": "Key_Escape", "Translations": { "ar_SA": null, "de_DE": null, @@ -526,7 +526,7 @@ } }, { - "ID": "KeySpace", + "ID": "Key_Space", "Translations": { "ar_SA": "مسافة", "de_DE": "Leertaste", @@ -551,7 +551,7 @@ } }, { - "ID": "KeyTab", + "ID": "Key_Tab", "Translations": { "ar_SA": null, "de_DE": null, @@ -576,7 +576,7 @@ } }, { - "ID": "KeyBackSpace", + "ID": "Key_BackSpace", "Translations": { "ar_SA": null, "de_DE": null, @@ -601,7 +601,7 @@ } }, { - "ID": "KeyInsert", + "ID": "Key_Insert", "Translations": { "ar_SA": null, "de_DE": null, @@ -626,7 +626,7 @@ } }, { - "ID": "KeyDelete", + "ID": "Key_Delete", "Translations": { "ar_SA": null, "de_DE": null, @@ -651,7 +651,7 @@ } }, { - "ID": "KeyPageUp", + "ID": "Key_PageUp", "Translations": { "ar_SA": null, "de_DE": null, @@ -676,7 +676,7 @@ } }, { - "ID": "KeyPageDown", + "ID": "Key_PageDown", "Translations": { "ar_SA": null, "de_DE": null, @@ -701,7 +701,7 @@ } }, { - "ID": "KeyHome", + "ID": "Key_Home", "Translations": { "ar_SA": null, "de_DE": null, @@ -726,7 +726,7 @@ } }, { - "ID": "KeyEnd", + "ID": "Key_End", "Translations": { "ar_SA": null, "de_DE": null, @@ -751,7 +751,7 @@ } }, { - "ID": "KeyCapsLock", + "ID": "Key_CapsLock", "Translations": { "ar_SA": null, "de_DE": null, @@ -776,7 +776,7 @@ } }, { - "ID": "KeyScrollLock", + "ID": "Key_ScrollLock", "Translations": { "ar_SA": null, "de_DE": null, @@ -801,7 +801,7 @@ } }, { - "ID": "KeyPrintScreen", + "ID": "Key_PrintScreen", "Translations": { "ar_SA": null, "de_DE": null, @@ -826,7 +826,7 @@ } }, { - "ID": "KeyPause", + "ID": "Key_Pause", "Translations": { "ar_SA": null, "de_DE": null, @@ -851,7 +851,7 @@ } }, { - "ID": "KeyNumLock", + "ID": "Key_NumLock", "Translations": { "ar_SA": null, "de_DE": null, @@ -876,7 +876,7 @@ } }, { - "ID": "KeyClear", + "ID": "Key_Clear", "Translations": { "ar_SA": null, "de_DE": null, @@ -901,7 +901,7 @@ } }, { - "ID": "KeyKeypad0", + "ID": "Key_Keypad0", "Translations": { "ar_SA": null, "de_DE": null, @@ -926,7 +926,7 @@ } }, { - "ID": "KeyKeypad1", + "ID": "Key_Keypad1", "Translations": { "ar_SA": null, "de_DE": null, @@ -951,7 +951,7 @@ } }, { - "ID": "KeyKeypad2", + "ID": "Key_Keypad2", "Translations": { "ar_SA": null, "de_DE": null, @@ -976,7 +976,7 @@ } }, { - "ID": "KeyKeypad3", + "ID": "Key_Keypad3", "Translations": { "ar_SA": null, "de_DE": null, @@ -1001,7 +1001,7 @@ } }, { - "ID": "KeyKeypad4", + "ID": "Key_Keypad4", "Translations": { "ar_SA": null, "de_DE": null, @@ -1026,7 +1026,7 @@ } }, { - "ID": "KeyKeypad5", + "ID": "Key_Keypad5", "Translations": { "ar_SA": null, "de_DE": null, @@ -1051,7 +1051,7 @@ } }, { - "ID": "KeyKeypad6", + "ID": "Key_Keypad6", "Translations": { "ar_SA": null, "de_DE": null, @@ -1076,7 +1076,7 @@ } }, { - "ID": "KeyKeypad7", + "ID": "Key_Keypad7", "Translations": { "ar_SA": null, "de_DE": null, @@ -1101,7 +1101,7 @@ } }, { - "ID": "KeyKeypad8", + "ID": "Key_Keypad8", "Translations": { "ar_SA": null, "de_DE": null, @@ -1126,7 +1126,7 @@ } }, { - "ID": "KeyKeypad9", + "ID": "Key_Keypad9", "Translations": { "ar_SA": null, "de_DE": null, @@ -1151,7 +1151,7 @@ } }, { - "ID": "KeyKeypadDivide", + "ID": "Key_KeypadDivide", "Translations": { "ar_SA": null, "de_DE": null, @@ -1176,7 +1176,7 @@ } }, { - "ID": "KeyKeypadMultiply", + "ID": "Key_KeypadMultiply", "Translations": { "ar_SA": null, "de_DE": null, @@ -1201,7 +1201,7 @@ } }, { - "ID": "KeyKeypadSubtract", + "ID": "Key_KeypadSubtract", "Translations": { "ar_SA": null, "de_DE": null, @@ -1226,7 +1226,7 @@ } }, { - "ID": "KeyKeypadAdd", + "ID": "Key_KeypadAdd", "Translations": { "ar_SA": null, "de_DE": null, @@ -1251,7 +1251,7 @@ } }, { - "ID": "KeyKeypadDecimal", + "ID": "Key_KeypadDecimal", "Translations": { "ar_SA": null, "de_DE": null, @@ -1276,7 +1276,7 @@ } }, { - "ID": "KeyKeypadEnter", + "ID": "Key_KeypadEnter", "Translations": { "ar_SA": null, "de_DE": null, @@ -1301,7 +1301,7 @@ } }, { - "ID": "KeyNumber0", + "ID": "Key_Number0", "Translations": { "ar_SA": "٠", "de_DE": "", @@ -1326,7 +1326,7 @@ } }, { - "ID": "KeyNumber1", + "ID": "Key_Number1", "Translations": { "ar_SA": "١", "de_DE": "", @@ -1351,7 +1351,7 @@ } }, { - "ID": "KeyNumber2", + "ID": "Key_Number2", "Translations": { "ar_SA": "٢", "de_DE": "", @@ -1376,7 +1376,7 @@ } }, { - "ID": "KeyNumber3", + "ID": "Key_Number3", "Translations": { "ar_SA": "٣", "de_DE": "", @@ -1401,7 +1401,7 @@ } }, { - "ID": "KeyNumber4", + "ID": "Key_Number4", "Translations": { "ar_SA": "٤", "de_DE": "", @@ -1426,7 +1426,7 @@ } }, { - "ID": "KeyNumber5", + "ID": "Key_Number5", "Translations": { "ar_SA": "٥", "de_DE": "", @@ -1451,7 +1451,7 @@ } }, { - "ID": "KeyNumber6", + "ID": "Key_Number6", "Translations": { "ar_SA": "٦", "de_DE": "", @@ -1476,7 +1476,7 @@ } }, { - "ID": "KeyNumber7", + "ID": "Key_Number7", "Translations": { "ar_SA": "٧", "de_DE": "", @@ -1501,7 +1501,7 @@ } }, { - "ID": "KeyNumber8", + "ID": "Key_Number8", "Translations": { "ar_SA": "٨", "de_DE": "", @@ -1526,7 +1526,7 @@ } }, { - "ID": "KeyNumber9", + "ID": "Key_Number9", "Translations": { "ar_SA": "٩", "de_DE": "", @@ -1551,7 +1551,7 @@ } }, { - "ID": "KeyTilde", + "ID": "Key_Tilde", "Translations": { "ar_SA": "", "de_DE": "", @@ -1576,7 +1576,7 @@ } }, { - "ID": "KeyGrave", + "ID": "Key_Grave", "Translations": { "ar_SA": "", "de_DE": "", @@ -1601,7 +1601,7 @@ } }, { - "ID": "KeyMinus", + "ID": "Key_Minus", "Translations": { "ar_SA": "", "de_DE": "", @@ -1626,7 +1626,7 @@ } }, { - "ID": "KeyPlus", + "ID": "Key_Plus", "Translations": { "ar_SA": "", "de_DE": "", @@ -1651,7 +1651,7 @@ } }, { - "ID": "KeyBracketLeft", + "ID": "Key_BracketLeft", "Translations": { "ar_SA": "", "de_DE": "", @@ -1676,7 +1676,7 @@ } }, { - "ID": "KeyBracketRight", + "ID": "Key_BracketRight", "Translations": { "ar_SA": "", "de_DE": "", @@ -1701,7 +1701,7 @@ } }, { - "ID": "KeySemicolon", + "ID": "Key_Semicolon", "Translations": { "ar_SA": "", "de_DE": "", @@ -1726,7 +1726,7 @@ } }, { - "ID": "KeyQuote", + "ID": "Key_Quote", "Translations": { "ar_SA": "", "de_DE": "", @@ -1751,7 +1751,7 @@ } }, { - "ID": "KeyComma", + "ID": "Key_Comma", "Translations": { "ar_SA": "", "de_DE": "", @@ -1776,7 +1776,7 @@ } }, { - "ID": "KeyPeriod", + "ID": "Key_Period", "Translations": { "ar_SA": "", "de_DE": "", @@ -1801,7 +1801,7 @@ } }, { - "ID": "KeySlash", + "ID": "Key_Slash", "Translations": { "ar_SA": "", "de_DE": "", @@ -1826,7 +1826,7 @@ } }, { - "ID": "KeyBackSlash", + "ID": "Key_BackSlash", "Translations": { "ar_SA": "", "de_DE": "", @@ -1851,7 +1851,7 @@ } }, { - "ID": "KeyUnbound", + "ID": "Key_Unbound", "Translations": { "ar_SA": "غير مرتبط", "de_DE": "Ungebunden", @@ -1876,7 +1876,7 @@ } }, { - "ID": "AllKeyboards", + "ID": "InputType_Keyboard", "Translations": { "ar_SA": "لوحة المفاتيح", "de_DE": "Tastatur", diff --git a/src/Ryujinx/Input/AvaloniaKeyboardDriver.cs b/src/Ryujinx/Input/AvaloniaKeyboardDriver.cs index da149c9d9..f7f9858ec 100644 --- a/src/Ryujinx/Input/AvaloniaKeyboardDriver.cs +++ b/src/Ryujinx/Input/AvaloniaKeyboardDriver.cs @@ -67,7 +67,7 @@ namespace Ryujinx.Ava.Input 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 GetGamepads() => [GetGamepad("0")]; diff --git a/src/Ryujinx/UI/Helpers/Converters/KeyValueConverter.cs b/src/Ryujinx/UI/Helpers/Converters/KeyValueConverter.cs index 76033c7e1..e12d18a6c 100644 --- a/src/Ryujinx/UI/Helpers/Converters/KeyValueConverter.cs +++ b/src/Ryujinx/UI/Helpers/Converters/KeyValueConverter.cs @@ -38,14 +38,14 @@ namespace Ryujinx.Ava.UI.Helpers { GamepadInputId.SingleRightTrigger0, LocaleKeys.GamepadSingleRightTrigger0}, { GamepadInputId.SingleLeftTrigger1, LocaleKeys.GamepadSingleLeftTrigger1}, { GamepadInputId.SingleRightTrigger1, LocaleKeys.GamepadSingleRightTrigger1}, - { GamepadInputId.Unbound, LocaleKeys.KeyboardLayout_KeyUnbound}, + { GamepadInputId.Unbound, LocaleKeys.KeyboardLayout_Key_Unbound}, }; private static readonly Dictionary _stickInputIdMap = new() { { StickInputId.Left, LocaleKeys.StickLeft}, { 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) diff --git a/src/Ryujinx/UI/Helpers/KeyboardLayoutLocaleHelper.cs b/src/Ryujinx/UI/Helpers/KeyboardLayoutLocaleHelper.cs index 17f6a8b56..c1fd98ce2 100644 --- a/src/Ryujinx/UI/Helpers/KeyboardLayoutLocaleHelper.cs +++ b/src/Ryujinx/UI/Helpers/KeyboardLayoutLocaleHelper.cs @@ -10,79 +10,79 @@ namespace Ryujinx.Ava.UI.Helpers { private static readonly Dictionary _sharedLocalizedKeysMap = new() { - [InputKey.Unknown] = LocaleKeys.KeyboardLayout_KeyUnknown, - [InputKey.ShiftLeft] = LocaleKeys.KeyboardLayout_KeyShiftLeft, - [InputKey.ShiftRight] = LocaleKeys.KeyboardLayout_KeyShiftRight, - [InputKey.ControlLeft] = LocaleKeys.KeyboardLayout_KeyControlLeft, - [InputKey.ControlRight] = LocaleKeys.KeyboardLayout_KeyControlRight, - [InputKey.AltLeft] = LocaleKeys.KeyboardLayout_KeyAltLeft, - [InputKey.AltRight] = LocaleKeys.KeyboardLayout_KeyAltRight, - [InputKey.WinLeft] = LocaleKeys.KeyboardLayout_KeyWinLeft, - [InputKey.WinRight] = LocaleKeys.KeyboardLayout_KeyWinRight, - [InputKey.Up] = LocaleKeys.KeyboardLayout_KeyUp, - [InputKey.Down] = LocaleKeys.KeyboardLayout_KeyDown, - [InputKey.Left] = LocaleKeys.KeyboardLayout_KeyLeft, - [InputKey.Right] = LocaleKeys.KeyboardLayout_KeyRight, - [InputKey.Enter] = LocaleKeys.KeyboardLayout_KeyEnter, - [InputKey.Escape] = LocaleKeys.KeyboardLayout_KeyEscape, - [InputKey.Space] = LocaleKeys.KeyboardLayout_KeySpace, - [InputKey.Tab] = LocaleKeys.KeyboardLayout_KeyTab, - [InputKey.BackSpace] = LocaleKeys.KeyboardLayout_KeyBackSpace, - [InputKey.Insert] = LocaleKeys.KeyboardLayout_KeyInsert, - [InputKey.Delete] = LocaleKeys.KeyboardLayout_KeyDelete, - [InputKey.PageUp] = LocaleKeys.KeyboardLayout_KeyPageUp, - [InputKey.PageDown] = LocaleKeys.KeyboardLayout_KeyPageDown, - [InputKey.Home] = LocaleKeys.KeyboardLayout_KeyHome, - [InputKey.End] = LocaleKeys.KeyboardLayout_KeyEnd, - [InputKey.CapsLock] = LocaleKeys.KeyboardLayout_KeyCapsLock, - [InputKey.ScrollLock] = LocaleKeys.KeyboardLayout_KeyScrollLock, - [InputKey.PrintScreen] = LocaleKeys.KeyboardLayout_KeyPrintScreen, - [InputKey.Pause] = LocaleKeys.KeyboardLayout_KeyPause, - [InputKey.NumLock] = LocaleKeys.KeyboardLayout_KeyNumLock, - [InputKey.Clear] = LocaleKeys.KeyboardLayout_KeyClear, - [InputKey.Keypad0] = LocaleKeys.KeyboardLayout_KeyKeypad0, - [InputKey.Keypad1] = LocaleKeys.KeyboardLayout_KeyKeypad1, - [InputKey.Keypad2] = LocaleKeys.KeyboardLayout_KeyKeypad2, - [InputKey.Keypad3] = LocaleKeys.KeyboardLayout_KeyKeypad3, - [InputKey.Keypad4] = LocaleKeys.KeyboardLayout_KeyKeypad4, - [InputKey.Keypad5] = LocaleKeys.KeyboardLayout_KeyKeypad5, - [InputKey.Keypad6] = LocaleKeys.KeyboardLayout_KeyKeypad6, - [InputKey.Keypad7] = LocaleKeys.KeyboardLayout_KeyKeypad7, - [InputKey.Keypad8] = LocaleKeys.KeyboardLayout_KeyKeypad8, - [InputKey.Keypad9] = LocaleKeys.KeyboardLayout_KeyKeypad9, - [InputKey.KeypadDivide] = LocaleKeys.KeyboardLayout_KeyKeypadDivide, - [InputKey.KeypadMultiply] = LocaleKeys.KeyboardLayout_KeyKeypadMultiply, - [InputKey.KeypadSubtract] = LocaleKeys.KeyboardLayout_KeyKeypadSubtract, - [InputKey.KeypadAdd] = LocaleKeys.KeyboardLayout_KeyKeypadAdd, - [InputKey.KeypadDecimal] = LocaleKeys.KeyboardLayout_KeyKeypadDecimal, - [InputKey.KeypadEnter] = LocaleKeys.KeyboardLayout_KeyKeypadEnter, - [InputKey.Unbound] = LocaleKeys.KeyboardLayout_KeyUnbound, + [InputKey.Unknown] = LocaleKeys.KeyboardLayout_Key_Unknown, + [InputKey.ShiftLeft] = LocaleKeys.KeyboardLayout_Key_ShiftLeft, + [InputKey.ShiftRight] = LocaleKeys.KeyboardLayout_Key_ShiftRight, + [InputKey.ControlLeft] = LocaleKeys.KeyboardLayout_Key_ControlLeft, + [InputKey.ControlRight] = LocaleKeys.KeyboardLayout_Key_ControlRight, + [InputKey.AltLeft] = LocaleKeys.KeyboardLayout_Key_AltLeft, + [InputKey.AltRight] = LocaleKeys.KeyboardLayout_Key_AltRight, + [InputKey.WinLeft] = LocaleKeys.KeyboardLayout_Key_WinLeft, + [InputKey.WinRight] = LocaleKeys.KeyboardLayout_Key_WinRight, + [InputKey.Up] = LocaleKeys.KeyboardLayout_Key_Up, + [InputKey.Down] = LocaleKeys.KeyboardLayout_Key_Down, + [InputKey.Left] = LocaleKeys.KeyboardLayout_Key_Left, + [InputKey.Right] = LocaleKeys.KeyboardLayout_Key_Right, + [InputKey.Enter] = LocaleKeys.KeyboardLayout_Key_Enter, + [InputKey.Escape] = LocaleKeys.KeyboardLayout_Key_Escape, + [InputKey.Space] = LocaleKeys.KeyboardLayout_Key_Space, + [InputKey.Tab] = LocaleKeys.KeyboardLayout_Key_Tab, + [InputKey.BackSpace] = LocaleKeys.KeyboardLayout_Key_BackSpace, + [InputKey.Insert] = LocaleKeys.KeyboardLayout_Key_Insert, + [InputKey.Delete] = LocaleKeys.KeyboardLayout_Key_Delete, + [InputKey.PageUp] = LocaleKeys.KeyboardLayout_Key_PageUp, + [InputKey.PageDown] = LocaleKeys.KeyboardLayout_Key_PageDown, + [InputKey.Home] = LocaleKeys.KeyboardLayout_Key_Home, + [InputKey.End] = LocaleKeys.KeyboardLayout_Key_End, + [InputKey.CapsLock] = LocaleKeys.KeyboardLayout_Key_CapsLock, + [InputKey.ScrollLock] = LocaleKeys.KeyboardLayout_Key_ScrollLock, + [InputKey.PrintScreen] = LocaleKeys.KeyboardLayout_Key_PrintScreen, + [InputKey.Pause] = LocaleKeys.KeyboardLayout_Key_Pause, + [InputKey.NumLock] = LocaleKeys.KeyboardLayout_Key_NumLock, + [InputKey.Clear] = LocaleKeys.KeyboardLayout_Key_Clear, + [InputKey.Keypad0] = LocaleKeys.KeyboardLayout_Key_Keypad0, + [InputKey.Keypad1] = LocaleKeys.KeyboardLayout_Key_Keypad1, + [InputKey.Keypad2] = LocaleKeys.KeyboardLayout_Key_Keypad2, + [InputKey.Keypad3] = LocaleKeys.KeyboardLayout_Key_Keypad3, + [InputKey.Keypad4] = LocaleKeys.KeyboardLayout_Key_Keypad4, + [InputKey.Keypad5] = LocaleKeys.KeyboardLayout_Key_Keypad5, + [InputKey.Keypad6] = LocaleKeys.KeyboardLayout_Key_Keypad6, + [InputKey.Keypad7] = LocaleKeys.KeyboardLayout_Key_Keypad7, + [InputKey.Keypad8] = LocaleKeys.KeyboardLayout_Key_Keypad8, + [InputKey.Keypad9] = LocaleKeys.KeyboardLayout_Key_Keypad9, + [InputKey.KeypadDivide] = LocaleKeys.KeyboardLayout_Key_KeypadDivide, + [InputKey.KeypadMultiply] = LocaleKeys.KeyboardLayout_Key_KeypadMultiply, + [InputKey.KeypadSubtract] = LocaleKeys.KeyboardLayout_Key_KeypadSubtract, + [InputKey.KeypadAdd] = LocaleKeys.KeyboardLayout_Key_KeypadAdd, + [InputKey.KeypadDecimal] = LocaleKeys.KeyboardLayout_Key_KeypadDecimal, + [InputKey.KeypadEnter] = LocaleKeys.KeyboardLayout_Key_KeypadEnter, + [InputKey.Unbound] = LocaleKeys.KeyboardLayout_Key_Unbound, }; private static readonly Dictionary _semanticPrintableKeysMap = new() { - [InputKey.Number0] = LocaleKeys.KeyboardLayout_KeyNumber0, - [InputKey.Number1] = LocaleKeys.KeyboardLayout_KeyNumber1, - [InputKey.Number2] = LocaleKeys.KeyboardLayout_KeyNumber2, - [InputKey.Number3] = LocaleKeys.KeyboardLayout_KeyNumber3, - [InputKey.Number4] = LocaleKeys.KeyboardLayout_KeyNumber4, - [InputKey.Number5] = LocaleKeys.KeyboardLayout_KeyNumber5, - [InputKey.Number6] = LocaleKeys.KeyboardLayout_KeyNumber6, - [InputKey.Number7] = LocaleKeys.KeyboardLayout_KeyNumber7, - [InputKey.Number8] = LocaleKeys.KeyboardLayout_KeyNumber8, - [InputKey.Number9] = LocaleKeys.KeyboardLayout_KeyNumber9, - [InputKey.Tilde] = LocaleKeys.KeyboardLayout_KeyTilde, - [InputKey.Grave] = LocaleKeys.KeyboardLayout_KeyGrave, - [InputKey.Minus] = LocaleKeys.KeyboardLayout_KeyMinus, - [InputKey.Plus] = LocaleKeys.KeyboardLayout_KeyPlus, - [InputKey.BracketLeft] = LocaleKeys.KeyboardLayout_KeyBracketLeft, - [InputKey.BracketRight] = LocaleKeys.KeyboardLayout_KeyBracketRight, - [InputKey.Semicolon] = LocaleKeys.KeyboardLayout_KeySemicolon, - [InputKey.Quote] = LocaleKeys.KeyboardLayout_KeyQuote, - [InputKey.Comma] = LocaleKeys.KeyboardLayout_KeyComma, - [InputKey.Period] = LocaleKeys.KeyboardLayout_KeyPeriod, - [InputKey.Slash] = LocaleKeys.KeyboardLayout_KeySlash, - [InputKey.BackSlash] = LocaleKeys.KeyboardLayout_KeyBackSlash, + [InputKey.Number0] = LocaleKeys.KeyboardLayout_Key_Number0, + [InputKey.Number1] = LocaleKeys.KeyboardLayout_Key_Number1, + [InputKey.Number2] = LocaleKeys.KeyboardLayout_Key_Number2, + [InputKey.Number3] = LocaleKeys.KeyboardLayout_Key_Number3, + [InputKey.Number4] = LocaleKeys.KeyboardLayout_Key_Number4, + [InputKey.Number5] = LocaleKeys.KeyboardLayout_Key_Number5, + [InputKey.Number6] = LocaleKeys.KeyboardLayout_Key_Number6, + [InputKey.Number7] = LocaleKeys.KeyboardLayout_Key_Number7, + [InputKey.Number8] = LocaleKeys.KeyboardLayout_Key_Number8, + [InputKey.Number9] = LocaleKeys.KeyboardLayout_Key_Number9, + [InputKey.Tilde] = LocaleKeys.KeyboardLayout_Key_Tilde, + [InputKey.Grave] = LocaleKeys.KeyboardLayout_Key_Grave, + [InputKey.Minus] = LocaleKeys.KeyboardLayout_Key_Minus, + [InputKey.Plus] = LocaleKeys.KeyboardLayout_Key_Plus, + [InputKey.BracketLeft] = LocaleKeys.KeyboardLayout_Key_BracketLeft, + [InputKey.BracketRight] = LocaleKeys.KeyboardLayout_Key_BracketRight, + [InputKey.Semicolon] = LocaleKeys.KeyboardLayout_Key_Semicolon, + [InputKey.Quote] = LocaleKeys.KeyboardLayout_Key_Quote, + [InputKey.Comma] = LocaleKeys.KeyboardLayout_Key_Comma, + [InputKey.Period] = LocaleKeys.KeyboardLayout_Key_Period, + [InputKey.Slash] = LocaleKeys.KeyboardLayout_Key_Slash, + [InputKey.BackSlash] = LocaleKeys.KeyboardLayout_Key_BackSlash, }; public static bool TryGetSemanticLabel(InputKey key, out string label) @@ -126,12 +126,12 @@ namespace Ryujinx.Ava.UI.Helpers { localeKey = localeKey switch { - LocaleKeys.KeyboardLayout_KeyControlLeft => LocaleKeys.KeyboardLayout_KeyMacControlLeft, - LocaleKeys.KeyboardLayout_KeyControlRight => LocaleKeys.KeyboardLayout_KeyMacControlRight, - LocaleKeys.KeyboardLayout_KeyAltLeft => LocaleKeys.KeyboardLayout_KeyMacAltLeft, - LocaleKeys.KeyboardLayout_KeyAltRight => LocaleKeys.KeyboardLayout_KeyMacAltRight, - LocaleKeys.KeyboardLayout_KeyWinLeft => LocaleKeys.KeyboardLayout_KeyMacWinLeft, - LocaleKeys.KeyboardLayout_KeyWinRight => LocaleKeys.KeyboardLayout_KeyMacWinRight, + LocaleKeys.KeyboardLayout_Key_ControlLeft => LocaleKeys.KeyboardLayout_Key_Mac_ControlLeft, + LocaleKeys.KeyboardLayout_Key_ControlRight => LocaleKeys.KeyboardLayout_Key_Mac_ControlRight, + LocaleKeys.KeyboardLayout_Key_AltLeft => LocaleKeys.KeyboardLayout_Key_Mac_AltLeft, + LocaleKeys.KeyboardLayout_Key_AltRight => LocaleKeys.KeyboardLayout_Key_Mac_AltRight, + LocaleKeys.KeyboardLayout_Key_WinLeft => LocaleKeys.KeyboardLayout_Key_Mac_WinLeft, + LocaleKeys.KeyboardLayout_Key_WinRight => LocaleKeys.KeyboardLayout_Key_Mac_WinRight, _ => localeKey }; }