Support keyed shortcuts during Secure Event Input - #929
Open
LuisUrrutia wants to merge 6 commits into
Open
LuisUrrutia wants to merge 6 commits into
LuisUrrutia wants to merge 6 commits into
Conversation
Secure Event Input can block keyboard delivery to a live event tap. Route supported keyed combinations through public Carbon hot-key registrations and feed their press/release events into the existing shortcut state and recording-mode callbacks. Keep the event-tap route for unsupported inputs and failed registrations, avoid duplicate transitions, and release registrations when monitoring stops. Add modifier and registration lifecycle tests and a physical-keyboard probe for the remaining delivery verification.
The xcconfig passed to make local overrode its command-line identity with ad-hoc signing. Let the Makefile supply the identity so a selected certificate can take effect instead of producing a changing cdhash requirement on every rebuild.
Restore LocalBuild.xcconfig to upstream/main so the pull request only changes shortcut handling and its verification tools.
LuisUrrutia
marked this pull request as ready for review
September 11, 2026 18:49
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 3 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Option-Space in Hybrid mode did nothing, even with a live, enabled event tap. Supported keyed shortcuts now use public Carbon system hot-key registrations, with press/release events feeding the existing recording-mode handling.
During the original diagnosis,
IsSecureEventInputEnabled()returnedtrue, andioregreportedkCGSSessionSecureInputPID=40972. That live PID mapped to Steam'ssteam_osxexecutable. After Steam exited,psconfirmed the PID was gone, but macOS still reported the same owner PID and Secure Event Input remained enabled. VoiceInk still had an enabled event tap, and the shortcut still failed.These observations establish a Steam-associated Secure Input state and a stale owner/state after exit in that session. They do not establish whether Steam, WindowServer, or macOS caused the persistence, or a repeatable Steam launch recipe. A later check reported Secure Input disabled and no former owner PID; what cleared the state is unknown.
Apple documents that Secure Event Input withholds keyboard events from event taps, including when the process enabling it is in the background. A live tap therefore does not establish that VoiceInk can receive the shortcut. Apple TN2150: https://developer.apple.com/library/archive/technotes/tn2150/_index.html. AltTab's API experiment matrix documents registered hot keys working through Secure Input: https://github.com/lwouis/alt-tab-macos/blob/609872b10605672bd0e9f8b012449f47c0573539/src/experimentations/README.md.
The shared monitor covers recording, mode, global utility, and visible recorder-panel shortcuts:
The patch does not disable Secure Input, capture protected text, clear another process's protection, or require restarting macOS.
Validation on macOS 26.6.2 / Xcode 26.6, arm64:
The behavioral, build, and launch checks below ran before the final test-name-only follow-up. That follow-up changes no test body, production code, or probe code; Swift parsing and diff checks passed afterward.
VoiceInkTestssuite withENABLE_TESTABILITY=YES: seven shortcut test cases plus the pre-existing empty example. The new partial-startup test failed before the rollback fix and passed afterward.CODE_SIGN_IDENTITY=-);codesign --verify --deep --strict; a separate launch check confirmed the exact built app finished launching and remained alive for 12 seconds.make checkandgit diff --check.VoiceInkUITests/VoiceInkUITests/testExampleattempt could not start because XCTest timed out while enabling automation mode (exit 65). UI automation remains unverified.Physical keyboard delivery during Secure Input, short/long Hybrid and push-to-talk holds, and a complete dictation cycle remain unverified. During the original diagnosis, a minimal prototype reported successful handler installation and registration with
secureInput=true; no physical press/release was captured. Synthetic keystrokes were not treated as proof.Substantial AI assistance was used for implementation, code review, verification, and PR text. No human code-review or physical-test completion is claimed. This submission acknowledges the repository's current policy against external PRs.