Add subscript & superscript characters for Quick Accent #41922 (#45540)

<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## 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.

<!-- Please review the items on the PR checklist before submitting-->
## 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

<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## 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)

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## 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 <saleh@interlandtech.com>
This commit is contained in:
Salehnaz
2026-03-31 12:35:28 +03:00
committed by GitHub
parent feae285c40
commit 8c8c99c382

View File

@@ -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[] { "" },
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<string>(),
};