[KBM] Simultaneous shortcut invocation in Keyboard Manager
Summary of the Pull Request
Simultaneous shortcut invoke operations are allowed.
Note: This branch opened from #31923 to avoid code conflicts.
PR Checklist
- [ ] Closes: #18459 #10393
- [ ] Communication: I've discussed this with core contributors already. If 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 for new binaries
- [ ] WXS for installer for new binaries and localization folder
- [ ] YML for CI pipeline for new test projects
- [ ] YML for signed pipeline
- [ ] Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx
Detailed Description of the Pull Request / Additional comments
Some unit tests have been changed according to the changes made.
ShortcutDisable_ShouldNotDisableShortcutSuperset_AfterShortcutWasDisabled
- When Ctrl + A invoked those keys are released for invoking shortcut (disabled). After new B key is pressed those are still released.
- Checking Ctrl + B and Ctrl + A + B shortcuts. Those are not exist. So only B key is pressed.
- isShortcutInvoked should be true because we are not resetting that. Because Ctrl, A keys are still pressed.
ShortcutDisable_ShouldResetIsOriginalActionKeyPressed_OnPressingAnotherKey
- Function name and test condition are changed because isOriginalActionKeyPressed is not reset when a new key is pressed after shortcut is invoked.
Validation Steps Performed
The following 3 shortcuts were used while testing:
- Win (Left) + E
- Win (Left) + S
- Win (Left) + V
While testing, all combinations of these shortcuts were tried:
- Win (Left) + E + S
- Win (Left) + E + V
- Win (Left) + S + V
- Win (Left) + S + E
- Win (Left) + V + E
- Win (Left) + V + S
- Win (Left) + E + S + V, V + S + E, S + V + E ...
While testing, the keys were tested with different press, keep pressed and release states:
- Win (Left) + E + Hold V pressed
- Win (Left) + E, release and press V consecutive
- Win (Left) + E, release E, press E, press V
- Win (Left) + E, release E, release Win (Left), press Win (Left) + E + V
- Win (Left) + E + Hold V pressed, release V and E, press V + Hold E pressed
- Win (Left) + release and press(hold or consecutive) different combinations of E + S + V
It was tested by making the following assignments to the shortcuts:
-
Win (Left) + E -> Disable
-
Win (Left) + S -> Disable
-
Win (Left) + V -> Disable
-
Win (Left) + E -> A
-
Win (Left) + S -> B
-
Win (Left) + V -> C
-
Win (Left) + E -> Ctrl (Left) + A
-
Win (Left) + S -> Ctrl (Left) + V
-
Win (Left) + V -> Ctrl (Left) + C
-
Win (Left) + E -> Send Text (qwe)
-
Win (Left) + S -> Send Text (asd)
-
Win (Left) + V -> Send Text (zxc)
-
Win (Left) + E -> Run Program (calculator.exe)
-
Win (Left) + S -> Run Program (notepad++.exe)
-
Win (Left) + V -> Run Program (chrome.exe)
-
Win (Left) + E -> Open URI (https://www.google.com/)
-
Win (Left) + S -> Open URI (https://github.com/microsoft/PowerToys)
-
Win (Left) + V -> Open URI (https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes)
It is also tested with common modifier and action keys:
Set shortcuts as below and test shortcuts together
-
Ctrl (Left) + A -> Q
-
Shift (Left) + A -> W
-
Alt (Left) + A -> E
-
Ctrl (Left) + Shift (Left) + A -> T
-
Ctrl (Left) + Alt (Left) + A -> Y
-
Shift (Left) + Alt (Left) + A -> U
-
Ctrl (Left) + Shift (Left) + Alt (Left) + A -> J
Please test with Alt gr too.
-
Altgr (Ctrl Left + Alt Right) + E
-
Altgr (Ctrl Left + Alt Right) + S
-
Altgr (Ctrl Left + Alt Right) + V
-
Altgr (Ctrl Left + Alt Right) + A -> Q
-
Shift Right + A -> W
-
Altgr (Ctrl Left + Alt Right) + Shift Right + A -> E
@check-spelling-bot Report
:red_circle: Please review
See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.
Unrecognized words (1)
prevkeys
Previously acknowledged words that are now absent
COMMANDTITLE FILELOCKSMITHLIB interactable JArray localport OOBEPT qwertyuiopasdfghjklzxcvbnm qwrtyuiopsghjklzxvnm redirectedfrom runsettings testhost toggleswitch 🫥To accept these unrecognized words as correct and remove the previously acknowledged and now absent words, you could run the following commands
... in a clone of the [email protected]:gokcekantarci/PowerToys.git repository
on the KBM-Simultaneously-Used-Shortcuts branch (:information_source: how do I use this?):
curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/v0.0.22/apply.pl' |
perl - 'https://github.com/microsoft/PowerToys/actions/runs/8752989388/attempts/1'
Available :books: dictionaries could cover words (expected and unrecognized) not in the :blue_book: dictionary
This includes both expected items (1873) from .github/actions/spell-check/expect.txt and unrecognized words (1)
| Dictionary | Entries | Covers | Uniquely |
|---|---|---|---|
| cspell:r/src/r.txt | 543 | 1 | 1 |
| cspell:cpp/src/people.txt | 23 | 1 | |
| cspell:cpp/src/ecosystem.txt | 51 | 1 |
Consider adding them (in .github/workflows/spelling2.yml) for uses: check-spelling/[email protected] in its with:
with:
extra_dictionaries:
cspell:r/src/r.txt
cspell:cpp/src/people.txt
cspell:cpp/src/ecosystem.txt
To stop checking additional dictionaries, add (in .github/workflows/spelling2.yml) for uses: check-spelling/[email protected] in its with:
check_extra_dictionaries: ''
If the flagged items are :exploding_head: false positives
If items relate to a ...
-
binary file (or some other file you wouldn't want to check at all).
Please add a file path to the
excludes.txtfile matching the containing file.File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
^refers to the file's path from the root of the repository, so^README\.md$would exclude README.md (on whichever branch you're using). -
well-formed pattern.
If you can write a pattern that would match it, try adding it to the
patterns.txtfile.Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.
Note that patterns can't match multiline strings.
@check-spelling-bot Report
:red_circle: Please review
See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.
Unrecognized words (1)
prevkeys
Previously acknowledged words that are now absent
COMMANDTITLE FILELOCKSMITHLIB interactable JArray ksh localport OOBEPT Pathto qwertyuiopasdfghjklzxcvbnm qwrtyuiopsghjklzxvnm redirectedfrom runsettings testhost toggleswitch 🫥To accept these unrecognized words as correct and remove the previously acknowledged and now absent words, you could run the following commands
... in a clone of the [email protected]:gokcekantarci/PowerToys.git repository
on the KBM-Simultaneously-Used-Shortcuts branch (:information_source: how do I use this?):
curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/v0.0.22/apply.pl' |
perl - 'https://github.com/microsoft/PowerToys/actions/runs/8753010978/attempts/1'
Available :books: dictionaries could cover words (expected and unrecognized) not in the :blue_book: dictionary
This includes both expected items (1873) from .github/actions/spell-check/expect.txt and unrecognized words (1)
| Dictionary | Entries | Covers | Uniquely |
|---|---|---|---|
| cspell:r/src/r.txt | 543 | 1 | 1 |
| cspell:cpp/src/people.txt | 23 | 1 | |
| cspell:cpp/src/ecosystem.txt | 51 | 1 |
Consider adding them (in .github/workflows/spelling2.yml) for uses: check-spelling/[email protected] in its with:
with:
extra_dictionaries:
cspell:r/src/r.txt
cspell:cpp/src/people.txt
cspell:cpp/src/ecosystem.txt
To stop checking additional dictionaries, add (in .github/workflows/spelling2.yml) for uses: check-spelling/[email protected] in its with:
check_extra_dictionaries: ''
If the flagged items are :exploding_head: false positives
If items relate to a ...
-
binary file (or some other file you wouldn't want to check at all).
Please add a file path to the
excludes.txtfile matching the containing file.File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
^refers to the file's path from the root of the repository, so^README\.md$would exclude README.md (on whichever branch you're using). -
well-formed pattern.
If you can write a pattern that would match it, try adding it to the
patterns.txtfile.Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.
Note that patterns can't match multiline strings.
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
this does actually fix https://github.com/microsoft/PowerToys/issues/10393
https://github.com/microsoft/PowerToys/issues/18459#issuecomment-2156623049
@gokcekantarci @stefansjfw Was is blocking this from being merged? Anything I could help out with? Am dying to use this 😄
@check-spelling-bot Report
:red_circle: Please review
See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.
Unrecognized words (1)
altgr
To accept these unrecognized words as correct, you could run the following commands
... in a clone of the [email protected]:gokcekantarci/PowerToys.git repository
on the KBM-Simultaneously-Used-Shortcuts branch (:information_source: how do I use this?):
curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/v0.0.22/apply.pl' |
perl - 'https://github.com/microsoft/PowerToys/actions/runs/10594055747/attempts/1'
Available :books: dictionaries could cover words (expected and unrecognized) not in the :blue_book: dictionary
This includes both expected items (1896) from .github/actions/spell-check/expect.txt and unrecognized words (1)
| Dictionary | Entries | Covers | Uniquely |
|---|---|---|---|
| cspell:r/src/r.txt | 543 | 1 | 1 |
| cspell:cpp/src/people.txt | 23 | 1 | |
| cspell:cpp/src/ecosystem.txt | 51 | 1 |
Consider adding them (in .github/workflows/spelling2.yml) for uses: check-spelling/[email protected] in its with:
with:
extra_dictionaries:
cspell:r/src/r.txt
cspell:cpp/src/people.txt
cspell:cpp/src/ecosystem.txt
To stop checking additional dictionaries, add (in .github/workflows/spelling2.yml) for uses: check-spelling/[email protected] in its with:
check_extra_dictionaries: ''
Warnings (1)
See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.
| :information_source: Warnings | Count |
|---|---|
| :information_source: non-alpha-in-dictionary | 1 |
See :information_source: Event descriptions for more information.
If the flagged items are :exploding_head: false positives
If items relate to a ...
-
binary file (or some other file you wouldn't want to check at all).
Please add a file path to the
excludes.txtfile matching the containing file.File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
^refers to the file's path from the root of the repository, so^README\.md$would exclude README.md (on whichever branch you're using). -
well-formed pattern.
If you can write a pattern that would match it, try adding it to the
patterns.txtfile.Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.
Note that patterns can't match multiline strings.