From a12cbe929dcb7bf225df7d594eb218f370c717ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaro=20Mart=C3=ADnez?= Date: Sun, 25 Feb 2024 03:46:58 -0500 Subject: [PATCH] Add TwoLetterName property to KeyboardLayout struct --- src/ManagedShell.Common/Structs/KeyboardLayout.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ManagedShell.Common/Structs/KeyboardLayout.cs b/src/ManagedShell.Common/Structs/KeyboardLayout.cs index 82feddf9..89337e65 100644 --- a/src/ManagedShell.Common/Structs/KeyboardLayout.cs +++ b/src/ManagedShell.Common/Structs/KeyboardLayout.cs @@ -9,6 +9,7 @@ public struct KeyboardLayout public ushort KeyboardId { get; set; } public string NativeName { get; set; } + public string TwoLetterName { get; set; } public string ThreeLetterName { get; set; } public string DisplayName { get; set; } @@ -20,6 +21,7 @@ public KeyboardLayout(uint layoutId) var cultureInfo = CultureInfo.GetCultureInfo(LanguageId); NativeName = cultureInfo.NativeName; + TwoLetterName = cultureInfo.TwoLetterISOLanguageName.ToUpper(); ThreeLetterName = cultureInfo.ThreeLetterWindowsLanguageName; DisplayName = cultureInfo.DisplayName; }