[Win] Enhance OptSpecialChars dead keys processing#732
[Win] Enhance OptSpecialChars dead keys processing#732RedBearAK wants to merge 4 commits intorbreaves:masterfrom
Conversation
For Windows/AHK: Adds more accurate and intuitive behavior to the process of using dead keys, to match macOS more closely, and fixes some of the Switch/Case lines that weren't working as expected (Escape, Space were not actually activating). Dead keys sequences will now place the pending diacritic accent character (e.g., umlaut [ ¨ ]) in a highlight, then either replace it with the full accented character (e.g., [ Ü ]) if there is a match, or deselect the diacritic character and exit the dead keys sequence, leaving the diacritic character visible. Any input other than Escape or Space or a matching letter will be passed through. This is a very close match for how dead keys work in macOS. Also enabled the ability to interrupt a dead key sequence by triggering another dead key sequence, which like many other keys will just leave the original diacritic character visible and insert the new one in a highlight as the start of the new sequence. This behaves like it does on a Mac when you change your mind in the middle and do a different dead key. Previous PR by this name had some unforeseen issues with non-character-generating input editing keys like arrows, Backspace, and Delete, which were being ignored/disabled by the AHK `Input` command. And the uppercase accented characters were not working properly. All such issues are fixed here and thoroughly tested. 🤞🏽 😮💨 🤞🏽
|
Added support for exiting dead keys with appropriate actions for the arrow keys, mimicking what happens in macOS as closely as possible. |
|
@RedBearAK, do you know if these modifications would also work for this configuration? I'm having a hard time with a Magic Keyboard here on KDE ^^ |
There are several different aspects of the answer to this question.
If you want to talk more about this, feel free to open an issue thread on the Toshy repo. |
|
@RedBearAK, thanks a lot for your quick and informative reply :) I'm going to check your repo here o/ Uhuul |
…breaves#885 from, respectively: RedBear/patch-40 (via donaldguy/harmonize-724-and-719), RedBearAK/patch-59, RedBearAK/mac_numpad_feature (via donaldguy/harmonize-744-and-724) & RedBearAK/patch-70 w/ menu order of OptSpecialChars, then Mac Numpad, then Media Arrows Fix & kinto.ahk logic blocks in that same order.
…#744, & rbreaves#867 from, respectively: RedBear/patch-46 (via donaldguy/661-on-forced-master), RedBear/patch-40 (via donaldguy/harmonize-724-and-719), RedBearAK/patch-59, RedBearAK/mac_numpad_feature (via donaldguy/harmonize-744-and-724) & RedBearAK/patch-70 w/ menu order of OptSpecialChars, then Mac Numpad, then Media Arrows Fix & kinto.ahk logic blocks in that same order. (Grand)parents are: - @^1 rbreaves/master@{2025-04-25 19:00} [= @^2^1 = @^3~4 = @^4~2 = @^5~3] (bed5f37~..4a3bfe7) - @^2^2 rbreaves#661: [Win] Enable Cmd+Grave (backtick) same application window switching (3799224~..66ccab5) - @^2 ^^ fixed for force push of rbreaves/master on 2022-05-14 (95e92b4) - @^3 rbreaves#732: [Win] Enhance OptSpecialChars dead keys processing (2a65285~..dab20fd) - @^4~^2 rbreaves#724: [Win] Optional fix for media arrow keys (new) (e3e912f~..cea4111) - @^4~ ^^ merge with rbreaves#719, choosing arrows fix after OptSpecialChars (3d9670b) - @^4^2 rbreaves#744: Mac Numpad Features (7f3c95e~..d0d0bd1) - @^4 ^^ merge with rbreaves#722+rbreaves#719, chosing numpad between arrows & chars (b0ee59a) - @^5 rbreaves#867: [Win] New Fixes for Finder Mods (2024-06)
…#744, & rbreaves#867 from, respectively: RedBear/patch-46 (via donaldguy/661-on-forced-master), RedBear/patch-40 (via donaldguy/harmonize-724-and-719), RedBearAK/patch-59, RedBearAK/mac_numpad_feature (via donaldguy/harmonize-744-and-724) & RedBearAK/patch-70 w/ menu order of OptSpecialChars, then Mac Numpad, then Media Arrows Fix & kinto.ahk logic blocks in that same order. Common branch point [except @^2^2] is (6aa5cc5, but in `windows/`): 7b3aba9: @^1~14 = @^2~15 = @^3~5 = @^4^1~15 = @^4^2~9 = @^5~17 > @^2^2 is common from @^2^2~2 = 648819f = 7b3aba9~20 (Grand)parents are: - @^1 rbreaves/HEAD@{2025-04-25 19:00} [@^2^ = @^4^^ = @^5~3] (7b3aba9~..4a3bfe7) - @^2 vvv fixed for push -f of rbreaves/master on 2022-5-14 (95e92b4) - @^2^2 rbreaves#661: [Win] Enable Cmd+` same app window switching (3799224~..66ccab5) - @^3 rbreaves#732: [Win] Enhance OptSpecialChars dead keys processing (5bf0cc2~..f0c2c00) - @^4 vvvv, chosing numpad between arrows & chars (b0ee59a) - @^4^2 rbreaves#744: Mac Numpad Features (7f3c95e~..d0d0bd1) - @^4^1 vvv w/ rbreaves#719, choosing arrows fix after OptSpecialChars (3d9670b) - @^4^1^2 rbreaves#724: [Win] Optional fix for media arrow keys (new) (e3e912f~..cea4111) - @^5 rbreaves#867: [Win] New Fixes for Finder Mods (2024-06) (8b8e399~..044017e)
@rbreaves
For Windows/AHK:
Adds more accurate and intuitive behavior to the process of using dead keys, to match macOS more closely, and fixes some of the Switch/Case lines that weren't working as expected (Escape, Space were not actually activating).
Dead keys sequences will now place the pending diacritic accent character (e.g., umlaut [ ¨ ]) in a highlight, then either replace it with the full accented character (e.g., [ Ü ]) if there is a match, or deselect the diacritic character and exit the dead keys sequence, leaving the diacritic character visible. Any input other than Escape or Space or a matching letter will be passed through. This is a very close match for how dead keys work in macOS.
Also enabled the ability to interrupt a dead key sequence by triggering another dead key sequence, which like many other keys will just leave the original diacritic character visible and insert the new one in a highlight as the start of the new sequence. This behaves like it does on a Mac when you change your mind in the middle and do a different dead key.
[EDIT: Added Ctrl keys to break the dead keys sequence when switching away to another app. This also matches the macOS behavior when you task switch before completing the dead keys sequence.]
Previous PR by this name had some unforeseen issues with non-character-generating input editing keys like arrows, Backspace, and Delete, which were being ignored/disabled by the AHK
Inputcommand. And the uppercase accented characters were not working properly. All such issues are fixed here and thoroughly tested.🤞🏽 😮💨 🤞🏽