Repository navigation
Default Caps Lock rules to all keyboards; show the options inline #1366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
malpern
wants to merge
2
commits into
master
Choose a base branch
from
fix/caps-all-keyboards-default
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+194
−82
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
docs/bugs/2026-11-07-session-startup-retired-during-caps-fleet-write.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # Session startup retired healthy workers during the Caps Lock fleet write | ||
|
|
||
| **Date:** 2026-11-07 | ||
| **Area:** driverless session runtime, all-keyboards Caps Lock | ||
|
|
||
| ## Symptom | ||
|
|
||
| With a Caps Lock rule enabled, KeyPath on the mini never finished starting. | ||
| The log repeated: | ||
|
|
||
| ``` | ||
| [SessionRuntime] Startup retired state=starting reason=none failure=none | ||
| [SessionWorker] Received signal 15; retiring | ||
| ``` | ||
|
|
||
| The wizard then opened with "Start driverless remapping" as the only issue. | ||
|
|
||
| ## Cause | ||
|
|
||
| The parent waited a fixed 40 iterations of 100 ms for the worker to report | ||
| `running`. In all-keyboards mode the worker first writes the Caps Lock mapping | ||
| to every keyboard interface. For each device it reads the current rows, | ||
| writes, and reads back, each through a separate `hidutil` run. The mini had a | ||
| cl80, an X2A mouse with a keyboard interface, and the KeyPath physical HID | ||
| fixture attached. Acquisition took about 5.1 s, so every attempt was retired | ||
| mid-write. A stack sample showed the worker in | ||
| `SessionCapsMappingFleet.acquire`, waiting on `hidutil`, not hung. | ||
|
|
||
| The single-keyboard path writes one device and stayed under the limit, which is | ||
| why this appeared only once that Mac moved to all-keyboards mode. | ||
|
|
||
| ## Fix | ||
|
|
||
| The startup wait is time-bounded (`sessionStartupTimeout`, 20 s) instead of | ||
| counted. A worker that reports `failed` or `secureInput`, or exits, still ends | ||
| the wait at once. | ||
|
|
||
| ## Follow-up | ||
|
|
||
| Batching the per-device `hidutil` runs would shorten startup itself. A worker | ||
| that reports progress during acquisition would also let the parent tell a slow | ||
| start from a hung one. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a user unchecks one keyboard while two are connected and then disconnects the other, this condition hides the remaining keyboard's checkbox even though its exclusion is still persisted.
SessionRuntimeWorkercontinues filtering that device out usingexcludedKeyboardIDs(), and toggling the main Caps Lock switch does not clear those exclusions. Consequently, Caps Lock rules remain off on the only connected keyboard, with no way to re-enable it in Settings without connecting another keyboard. Show the scope controls when a connected keyboard is excluded, even if only one remains.Useful? React with 👍 / 👎.