mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 09:46:54 +02:00
<!-- 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:
@@ -189,7 +189,7 @@ namespace PowerAccent.Core
|
|||||||
{
|
{
|
||||||
return letter switch
|
return letter switch
|
||||||
{
|
{
|
||||||
LetterKey.VK_0 => new[] { "₀", "⁰", "°", "↉" },
|
LetterKey.VK_0 => new[] { "₀", "⁰", "°", "↉", "₎", "⁾" },
|
||||||
LetterKey.VK_1 => new[] { "₁", "¹", "½", "⅓", "¼", "⅕", "⅙", "⅐", "⅛", "⅑", "⅒" },
|
LetterKey.VK_1 => new[] { "₁", "¹", "½", "⅓", "¼", "⅕", "⅙", "⅐", "⅛", "⅑", "⅒" },
|
||||||
LetterKey.VK_2 => new[] { "₂", "²", "⅔", "⅖" },
|
LetterKey.VK_2 => new[] { "₂", "²", "⅔", "⅖" },
|
||||||
LetterKey.VK_3 => new[] { "₃", "³", "¾", "⅗", "⅜" },
|
LetterKey.VK_3 => new[] { "₃", "³", "¾", "⅗", "⅜" },
|
||||||
@@ -198,39 +198,40 @@ namespace PowerAccent.Core
|
|||||||
LetterKey.VK_6 => new[] { "₆", "⁶" },
|
LetterKey.VK_6 => new[] { "₆", "⁶" },
|
||||||
LetterKey.VK_7 => new[] { "₇", "⁷", "⅞" },
|
LetterKey.VK_7 => new[] { "₇", "⁷", "⅞" },
|
||||||
LetterKey.VK_8 => new[] { "₈", "⁸", "∞" },
|
LetterKey.VK_8 => new[] { "₈", "⁸", "∞" },
|
||||||
LetterKey.VK_9 => new[] { "₉", "⁹" },
|
LetterKey.VK_9 => new[] { "₉", "⁹", "₍", "⁽" },
|
||||||
LetterKey.VK_A => new[] { "ȧ", "ǽ", "∀" },
|
LetterKey.VK_A => new[] { "ȧ", "ǽ", "∀", "ᵃ", "ₐ" },
|
||||||
LetterKey.VK_B => new[] { "ḃ" },
|
LetterKey.VK_B => new[] { "ḃ", "ᵇ" },
|
||||||
LetterKey.VK_C => new[] { "ċ", "°C", "©", "ℂ", "∁" },
|
LetterKey.VK_C => new[] { "ċ", "°C", "©", "ℂ", "∁", "ᶜ" },
|
||||||
LetterKey.VK_D => new[] { "ḍ", "ḋ", "∂" },
|
LetterKey.VK_D => new[] { "ḍ", "ḋ", "∂", "ᵈ" },
|
||||||
LetterKey.VK_E => new[] { "∈", "∃", "∄", "∉", "ĕ" },
|
LetterKey.VK_E => new[] { "∈", "∃", "∄", "∉", "ĕ", "ᵉ", "ₑ" },
|
||||||
LetterKey.VK_F => new[] { "ḟ", "°F" },
|
LetterKey.VK_F => new[] { "ḟ", "°F", "ᶠ" },
|
||||||
LetterKey.VK_G => new[] { "ģ", "ǧ", "ġ", "ĝ", "ǥ" },
|
LetterKey.VK_G => new[] { "ģ", "ǧ", "ġ", "ĝ", "ǥ", "ᵍ" },
|
||||||
LetterKey.VK_H => new[] { "ḣ", "ĥ", "ħ" },
|
LetterKey.VK_H => new[] { "ḣ", "ĥ", "ħ", "ʰ", "ₕ" },
|
||||||
LetterKey.VK_J => new[] { "ĵ" },
|
LetterKey.VK_I => new[] { "ⁱ", "ᵢ" },
|
||||||
LetterKey.VK_K => new[] { "ķ", "ǩ" },
|
LetterKey.VK_J => new[] { "ĵ", "ʲ", "ⱼ" },
|
||||||
LetterKey.VK_L => new[] { "ļ", "₺" }, // ₺ is in VK_T for other languages, but not VK_L, so we add it here.
|
LetterKey.VK_K => new[] { "ķ", "ǩ", "ᵏ", "ₖ" },
|
||||||
LetterKey.VK_M => new[] { "ṁ" },
|
LetterKey.VK_L => new[] { "ļ", "₺", "ˡ", "ₗ" }, // ₺ is in VK_T for other languages, but not VK_L, so we add it here.
|
||||||
LetterKey.VK_N => new[] { "ņ", "ṅ", "ⁿ", "ℕ", "№" },
|
LetterKey.VK_M => new[] { "ṁ", "ᵐ", "ₘ" },
|
||||||
LetterKey.VK_O => new[] { "ȯ", "∅", "⌀" },
|
LetterKey.VK_N => new[] { "ņ", "ṅ", "ⁿ", "ℕ", "№", "ₙ" },
|
||||||
LetterKey.VK_P => new[] { "ṗ", "℗", "∏", "¶" },
|
LetterKey.VK_O => new[] { "ȯ", "∅", "⌀", "ᵒ", "ₒ" },
|
||||||
LetterKey.VK_Q => new[] { "ℚ" },
|
LetterKey.VK_P => new[] { "ṗ", "℗", "∏", "¶", "ᵖ", "ₚ" },
|
||||||
LetterKey.VK_R => new[] { "ṙ", "®", "ℝ" },
|
LetterKey.VK_Q => new[] { "ℚ", "𐞥" },
|
||||||
LetterKey.VK_S => new[] { "ṡ", "§", "∑", "∫" },
|
LetterKey.VK_R => new[] { "ṙ", "®", "ℝ", "ʳ", "ᵣ" },
|
||||||
LetterKey.VK_T => new[] { "ţ", "ṫ", "ŧ", "™" },
|
LetterKey.VK_S => new[] { "ṡ", "§", "∑", "∫", "ˢ", "ₛ" },
|
||||||
LetterKey.VK_U => new[] { "ŭ" },
|
LetterKey.VK_T => new[] { "ţ", "ṫ", "ŧ", "™", "ᵗ", "ₜ" },
|
||||||
LetterKey.VK_V => new[] { "V̇" },
|
LetterKey.VK_U => new[] { "ŭ", "ᵘ", "ᵤ" },
|
||||||
LetterKey.VK_W => new[] { "ẇ" },
|
LetterKey.VK_V => new[] { "V̇", "ᵛ", "ᵥ" },
|
||||||
LetterKey.VK_X => new[] { "ẋ", "×" },
|
LetterKey.VK_W => new[] { "ẇ", "ʷ" },
|
||||||
LetterKey.VK_Y => new[] { "ẏ", "ꝡ" },
|
LetterKey.VK_X => new[] { "ẋ", "×", "ˣ", "ₓ" },
|
||||||
LetterKey.VK_Z => 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_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_PERIOD => new[] { "…", "⁝", "\u0300", "\u0301", "\u0302", "\u0303", "\u0304", "\u0308", "\u030B", "\u030C" },
|
||||||
LetterKey.VK_MINUS => new[] { "~", "‐", "‑", "‒", "—", "―", "⁓", "−", "⸺", "⸻", "∓" },
|
LetterKey.VK_MINUS => new[] { "~", "‐", "‑", "‒", "—", "―", "⁓", "−", "⸺", "⸻", "∓", "₋", "⁻" },
|
||||||
LetterKey.VK_SLASH_ => new[] { "÷", "√" },
|
LetterKey.VK_SLASH_ => new[] { "÷", "√" },
|
||||||
LetterKey.VK_DIVIDE_ => new[] { "÷", "√" },
|
LetterKey.VK_DIVIDE_ => new[] { "÷", "√" },
|
||||||
LetterKey.VK_MULTIPLY_ => new[] { "×", "⋅" },
|
LetterKey.VK_MULTIPLY_ => new[] { "×", "⋅", "ˣ", "ₓ" },
|
||||||
LetterKey.VK_PLUS => new[] { "≤", "≥", "≠", "≈", "≙", "⊕", "⊗", "±", "≅", "≡", "₊", "⁺" },
|
LetterKey.VK_PLUS => new[] { "≤", "≥", "≠", "≈", "≙", "⊕", "⊗", "±", "≅", "≡", "₊", "⁺", "₌", "⁼" },
|
||||||
LetterKey.VK_BACKSLASH => new[] { "`", "~" },
|
LetterKey.VK_BACKSLASH => new[] { "`", "~" },
|
||||||
_ => Array.Empty<string>(),
|
_ => Array.Empty<string>(),
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user