From 8c8c99c3820c67434a3d48ad19ea761b04a846d6 Mon Sep 17 00:00:00 2001 From: Salehnaz <65551578+Salehnaz@users.noreply.github.com> Date: Tue, 31 Mar 2026 12:35:28 +0300 Subject: [PATCH] Add subscript & superscript characters for Quick Accent #41922 (#45540) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary of the Pull Request This PR adds subscript and superscript characters to the "Special Characters" set in Quick Accent. This addresses the request in issue #41922, allowing users to easily type common mathematical notations (e.g., x², H₂O) using the Quick Accent menu. ## PR Checklist - [x] Closes: #41922 - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx ## Detailed Description of the Pull Request / Additional comments The following Unicode subscript and superscript variants were added to [GetDefaultLetterKeySPECIAL](cci:1://file:///c:/Users/user/Desktop/salehcode/opensource/contribution/Linuxcontrib/PowerToys/src/modules/poweraccent/PowerAccent.Core/Languages.cs:185:8-236:9) in [Languages.cs](cci:7://file:///c:/Users/user/Desktop/salehcode/opensource/contribution/Linuxcontrib/PowerToys/src/modules/poweraccent/PowerAccent.Core/Languages.cs:0:0-0:0): - **0**: ₀, ⁰, ⁾, ₎ - **9**: ₉, ⁹, ⁽, ₍ - **A**: ᵃ, ₐ - **E**: ᵉ, ₑ - **N**: ₙ - **X**: ˣ, ₓ - **Y**: ʸ - **Z**: ᶻ - **+**: ₌, ⁼ (equals signs) - **-**: ₋, ⁻ (minus signs) - *****: ˣ, ₓ (multiplication sign variants) ## Validation Steps Performed Verified that the Unicode codepoints correspond to the correct subscript and superscript glyphs. This change only modifies the static data list used by Quick Accent and does not alter any logic. --------- Co-authored-by: saleh --- .../poweraccent/PowerAccent.Core/Languages.cs | 61 ++++++++++--------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/src/modules/poweraccent/PowerAccent.Core/Languages.cs b/src/modules/poweraccent/PowerAccent.Core/Languages.cs index d568a60e31..2a31d24815 100644 --- a/src/modules/poweraccent/PowerAccent.Core/Languages.cs +++ b/src/modules/poweraccent/PowerAccent.Core/Languages.cs @@ -189,7 +189,7 @@ namespace PowerAccent.Core { return letter switch { - LetterKey.VK_0 => new[] { "₀", "⁰", "°", "↉" }, + LetterKey.VK_0 => new[] { "₀", "⁰", "°", "↉", "₎", "⁾" }, LetterKey.VK_1 => new[] { "₁", "¹", "½", "⅓", "¼", "⅕", "⅙", "⅐", "⅛", "⅑", "⅒" }, LetterKey.VK_2 => new[] { "₂", "²", "⅔", "⅖" }, LetterKey.VK_3 => new[] { "₃", "³", "¾", "⅗", "⅜" }, @@ -198,39 +198,40 @@ namespace PowerAccent.Core LetterKey.VK_6 => new[] { "₆", "⁶" }, LetterKey.VK_7 => new[] { "₇", "⁷", "⅞" }, LetterKey.VK_8 => new[] { "₈", "⁸", "∞" }, - LetterKey.VK_9 => 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_H => 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_Q => new[] { "ℚ" }, - LetterKey.VK_R => new[] { "ṙ", "®", "ℝ" }, - LetterKey.VK_S => new[] { "ṡ", "§", "∑", "∫" }, - LetterKey.VK_T => new[] { "ţ", "ṫ", "ŧ", "™" }, - LetterKey.VK_U => new[] { "ŭ" }, - LetterKey.VK_V => new[] { "V̇" }, - LetterKey.VK_W => new[] { "ẇ" }, - LetterKey.VK_X => new[] { "ẋ", "×" }, - LetterKey.VK_Y => new[] { "ẏ", "ꝡ" }, - LetterKey.VK_Z => new[] { "ʒ", "ǯ", "ℤ" }, + LetterKey.VK_9 => 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_H => 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_Q => new[] { "ℚ", "𐞥" }, + LetterKey.VK_R => new[] { "ṙ", "®", "ℝ", "ʳ", "ᵣ" }, + LetterKey.VK_S => new[] { "ṡ", "§", "∑", "∫", "ˢ", "ₛ" }, + LetterKey.VK_T => new[] { "ţ", "ṫ", "ŧ", "™", "ᵗ", "ₜ" }, + LetterKey.VK_U => new[] { "ŭ", "ᵘ", "ᵤ" }, + LetterKey.VK_V => new[] { "V̇", "ᵛ", "ᵥ" }, + LetterKey.VK_W => new[] { "ẇ", "ʷ" }, + LetterKey.VK_X => new[] { "ẋ", "×", "ˣ", "ₓ" }, + LetterKey.VK_Y => 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", "\u030B", "\u030C" }, - LetterKey.VK_MINUS => new[] { "~", "‐", "‑", "‒", "—", "―", "⁓", "−", "⸺", "⸻", "∓" }, + LetterKey.VK_MINUS => new[] { "~", "‐", "‑", "‒", "—", "―", "⁓", "−", "⸺", "⸻", "∓", "₋", "⁻" }, LetterKey.VK_SLASH_ => new[] { "÷", "√" }, LetterKey.VK_DIVIDE_ => new[] { "÷", "√" }, - LetterKey.VK_MULTIPLY_ => new[] { "×", "⋅" }, - LetterKey.VK_PLUS => new[] { "≤", "≥", "≠", "≈", "≙", "⊕", "⊗", "±", "≅", "≡", "₊", "⁺" }, + LetterKey.VK_MULTIPLY_ => new[] { "×", "⋅", "ˣ", "ₓ" }, + LetterKey.VK_PLUS => new[] { "≤", "≥", "≠", "≈", "≙", "⊕", "⊗", "±", "≅", "≡", "₊", "⁺", "₌", "⁼" }, LetterKey.VK_BACKSLASH => new[] { "`", "~" }, _ => Array.Empty(), };