Skip to content

Commit

Permalink
Add TwoLetterName property to KeyboardLayout struct
Browse files Browse the repository at this point in the history
  • Loading branch information
xoascf committed Feb 25, 2024
1 parent 6c5f51e commit a12cbe9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ManagedShell.Common/Structs/KeyboardLayout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

Expand All @@ -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;
}
Expand Down

0 comments on commit a12cbe9

Please sign in to comment.