diff --git a/src/modules/poweraccent/PowerAccent.Core/Languages.cs b/src/modules/poweraccent/PowerAccent.Core/Languages.cs index eaeed2cb13..87cb2c25b2 100644 --- a/src/modules/poweraccent/PowerAccent.Core/Languages.cs +++ b/src/modules/poweraccent/PowerAccent.Core/Languages.cs @@ -18,6 +18,7 @@ namespace PowerAccent.Core GA, GD, DE, + EL, EST, FI, FR, @@ -58,6 +59,7 @@ namespace PowerAccent.Core Language.GA => GetDefaultLetterKeyGA(letter), // Gaeilge (Irish) Language.GD => GetDefaultLetterKeyGD(letter), // Gàidhlig (Scottish Gaelic) Language.DE => GetDefaultLetterKeyDE(letter), // German + Language.EL => GetDefaultLetterKeyEL(letter), // Greek Language.EST => GetDefaultLetterKeyEST(letter), // Estonian Language.FI => GetDefaultLetterKeyFI(letter), // Finnish Language.FR => GetDefaultLetterKeyFR(letter), // French @@ -101,6 +103,7 @@ namespace PowerAccent.Core .Union(GetDefaultLetterKeyGA(letter)) .Union(GetDefaultLetterKeyGD(letter)) .Union(GetDefaultLetterKeyDE(letter)) + .Union(GetDefaultLetterKeyEL(letter)) .Union(GetDefaultLetterKeyEST(letter)) .Union(GetDefaultLetterKeyFI(letter)) .Union(GetDefaultLetterKeyFR(letter)) @@ -144,32 +147,32 @@ namespace PowerAccent.Core LetterKey.VK_4 => new[] { "⅘" }, LetterKey.VK_5 => new[] { "⅚", "⅝" }, LetterKey.VK_7 => new[] { "⅞" }, - LetterKey.VK_A => new[] { "α", "ά", "ȧ" }, - LetterKey.VK_B => new[] { "ḃ", "β" }, - LetterKey.VK_C => new[] { "ċ", "χ", "°C", "©", "ℂ" }, - LetterKey.VK_D => new[] { "ḍ", "ḋ", "δ" }, - LetterKey.VK_E => new[] { "ε", "έ", "η", "ή", "∈" }, + LetterKey.VK_A => new[] { "ά", "ȧ" }, + LetterKey.VK_B => new[] { "ḃ" }, + LetterKey.VK_C => new[] { "ċ", "°C", "©", "ℂ" }, + LetterKey.VK_D => new[] { "ḍ", "ḋ" }, + LetterKey.VK_E => new[] { "έ", "ή", "∈" }, LetterKey.VK_F => new[] { "ḟ", "°F" }, - LetterKey.VK_G => new[] { "ģ", "ǧ", "ġ", "ĝ", "ǥ", "γ" }, + LetterKey.VK_G => new[] { "ģ", "ǧ", "ġ", "ĝ", "ǥ" }, LetterKey.VK_H => new[] { "ḣ", "ĥ", "ħ" }, - LetterKey.VK_I => new[] { "ι", "ί" }, + LetterKey.VK_I => new[] { "ί" }, LetterKey.VK_J => new[] { "ĵ" }, - LetterKey.VK_K => new[] { "ķ", "ǩ", "κ" }, - LetterKey.VK_L => new[] { "ļ", "₺", "λ" }, // ₺ is in VK_T for other languages, but not VK_L, so we add it here. - LetterKey.VK_M => new[] { "ṁ", "μ" }, - LetterKey.VK_N => new[] { "ņ", "ṅ", "ⁿ", "ν", "ℕ" }, - LetterKey.VK_O => new[] { "ȯ", "ω", "ώ", "ο", "ό" }, - LetterKey.VK_P => new[] { "ṗ", "φ", "ψ", "℗" }, + LetterKey.VK_K => new[] { "ķ", "ǩ" }, + LetterKey.VK_L => new[] { "ļ", "₺" }, // ₺ is in VK_T for other languages, but not VK_L, so we add it here. + LetterKey.VK_M => new[] { "ṁ" }, + LetterKey.VK_N => new[] { "ņ", "ṅ", "ⁿ", "ℕ" }, + LetterKey.VK_O => new[] { "ȯ", "ώ", "ό" }, + LetterKey.VK_P => new[] { "ṗ", "℗" }, LetterKey.VK_Q => new[] { "ℚ" }, - LetterKey.VK_R => new[] { "ṙ", "ρ", "®", "ℝ" }, - LetterKey.VK_S => new[] { "ṡ", "σ", "\u00A7" }, - LetterKey.VK_T => new[] { "ţ", "ṫ", "ŧ", "θ", "τ", "™" }, - LetterKey.VK_U => new[] { "ŭ", "υ", "ύ" }, + LetterKey.VK_R => new[] { "ṙ", "®", "ℝ" }, + LetterKey.VK_S => new[] { "ṡ", "\u00A7" }, + LetterKey.VK_T => new[] { "ţ", "ṫ", "ŧ", "™" }, + LetterKey.VK_U => new[] { "ŭ", "ύ" }, LetterKey.VK_V => new[] { "V̇" }, LetterKey.VK_W => new[] { "ẇ" }, - LetterKey.VK_X => new[] { "ẋ", "ξ", "×" }, + LetterKey.VK_X => new[] { "ẋ", "×" }, LetterKey.VK_Y => new[] { "ẏ", "ꝡ" }, - LetterKey.VK_Z => new[] { "ʒ", "ǯ", "ζ", "ℤ" }, + LetterKey.VK_Z => new[] { "ʒ", "ǯ", "ℤ" }, LetterKey.VK_COMMA => new[] { "∙", "₋", "⁻", "–" }, // – is in VK_MINUS for other languages, but not VK_COMMA, so we add it here. LetterKey.VK_PERIOD => new[] { "\u0300", "\u0301", "\u0302", "\u0303", "\u0304", "\u0308", "\u030C" }, LetterKey.VK_MINUS => new[] { "~", "‐", "‑", "‒", "—", "―", "⁓", "−", "⸺", "⸻" }, @@ -523,6 +526,36 @@ namespace PowerAccent.Core }; } + // Greek + private static string[] GetDefaultLetterKeyEL(LetterKey letter) + { + return letter switch + { + LetterKey.VK_A => new string[] { "α" }, + LetterKey.VK_B => new string[] { "β" }, + LetterKey.VK_C => new string[] { "χ" }, + LetterKey.VK_D => new string[] { "δ" }, + LetterKey.VK_E => new string[] { "ε", "η" }, + LetterKey.VK_F => new string[] { "φ" }, + LetterKey.VK_G => new string[] { "γ" }, + LetterKey.VK_I => new string[] { "ι" }, + LetterKey.VK_K => new string[] { "κ" }, + LetterKey.VK_L => new string[] { "λ" }, + LetterKey.VK_M => new string[] { "μ" }, + LetterKey.VK_N => new string[] { "ν" }, + LetterKey.VK_O => new string[] { "ο", "ω" }, + LetterKey.VK_P => new string[] { "π", "φ", "ψ" }, + LetterKey.VK_R => new string[] { "ρ" }, + LetterKey.VK_S => new string[] { "σ" }, + LetterKey.VK_T => new string[] { "τ", "θ" }, + LetterKey.VK_U => new string[] { "υ" }, + LetterKey.VK_X => new string[] { "ξ" }, + LetterKey.VK_Y => new string[] { "υ" }, + LetterKey.VK_Z => new string[] { "ζ" }, + _ => Array.Empty(), + }; + } + // Hebrew private static string[] GetDefaultLetterKeyHE(LetterKey letter) { diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerAccentPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerAccentPage.xaml index 5262e70faa..535f79b2bb 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerAccentPage.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerAccentPage.xaml @@ -53,6 +53,7 @@ + diff --git a/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw b/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw index 6df133fbf0..83b9513657 100644 --- a/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw +++ b/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw @@ -3360,6 +3360,9 @@ Activate by holding the key for the character you want to add an accent to, then German + + Greek + Hebrew diff --git a/src/settings-ui/Settings.UI/ViewModels/PowerAccentViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/PowerAccentViewModel.cs index df512cc727..d6f867306e 100644 --- a/src/settings-ui/Settings.UI/ViewModels/PowerAccentViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/PowerAccentViewModel.cs @@ -32,6 +32,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels "GA", "GD", "NL", + "EL", "EST", "FI", "FR",