feat(os): macOS keystroke injection + window enumeration#21
Merged
statik merged 1 commit intoJun 21, 2026
Merged
Conversation
Port injector_darwin.go + keymap_darwin.go + cinject_darwin.m into hyperdeck-os behind cfg(target_os = "macos"): - injector::keymap_darwin: pure kVK key codes + CGEventFlags modifier masks (unit-tested) - injector::macos_impl::MacInjector: Focus (NSRunningApplication activate by pid), SendKeys (CGEvent keyboard events posted via CGEventPostToPid for background, focus-free injection), OpenWindows (CGWindowList info dictionaries -> pid/owner/title) - request_accessibility() via AXIsProcessTrustedWithOptions (prompting), wired into the injector module's macOS dispatch Uses core-graphics (elcapitan feature for post_to_pid), core-foundation, and objc2-app-kit (libc feature). Verified locally with `cargo check/clippy --target aarch64-apple-darwin` plus the windows-gnu and linux targets; all three clippy-clean, workspace tests green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R8X1NxFiaLGJzwUD5wgRTv
statik
merged commit Jun 21, 2026
6c0bdbf
into
claude/tauri-migration-self-update-74d57g
5 checks passed
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.
Step 9 of the Tauri/Rust migration
macOS keystroke injection + window enumeration (port of
injector_darwin.go,keymap_darwin.go, andcinject_darwin.m), behindcfg(target_os = "macos").What's here
injector::keymap_darwin— pure kVK key codes + CGEventFlags modifier masks (unit-tested).injector::macos_impl::MacInjector:Focus—NSRunningApplication::runningApplicationWithProcessIdentifier+activateWithOptions(objc2-app-kit).SendKeys—CGEventkeyboard events posted viaCGEventPostToPid(background, focus-free injection — the app's core macOS behavior), with CGEventFlags for modifiers.OpenWindows—CGWindowListCopyWindowInfodictionaries → pid / owner / title.request_accessibility()viaAXIsProcessTrustedWithOptions(prompting), wired into the injector module's macOS dispatch.core-graphics(with theelcapitanfeature forpost_to_pid),core-foundation,objc2-app-kit(withlibc).Verification
OS FFI → behavior validated on hardware via #10. Compilation verified locally with
cargo check/clippy --target aarch64-apple-darwin(real FFI) and thex86_64-pc-windows-gnu+ Linux targets; all three clippy-clean. The CI matrix re-verifies on real macOS/Windows/Linux runners.Status
With this, both macOS and Windows injection + window enumeration are ported. Remaining: Windows UI Automation control, then the Tauri shell (tray + updater) and release workflow.
Part of: #10, #11, #12.
Generated by Claude Code