feat(os): Windows keystroke injection + window enumeration#20
Merged
statik merged 1 commit intoJun 21, 2026
Merged
Conversation
Port injector_windows.go + keymap_windows.go into hyperdeck-os behind
cfg(windows), with a no-op fallback elsewhere:
- injector::keymap_windows: pure VK-code / modifier / extended-key mapping
(unit-tested)
- injector::windows_impl::WinInput (windows crate): Focus (SetForegroundWindow
with the AttachThreadInput + foreground-lock-timeout dance), SendKeys
(SendInput when the target is foreground, PostMessage WM_KEYDOWN/UP when
background), and OpenWindows (EnumWindows + Toolhelp pid->exe names)
- injector::{injector, enumerator, request_accessibility} composition entry
points; non-Windows returns a no-op injector/enumerator (macOS impl follows)
Adds the windows crate as a cfg(windows)-only dependency. Verified locally
with `cargo check/clippy --target x86_64-pc-windows-gnu` (real FFI) and the
apple-darwin + linux targets (no-op path); workspace fmt/clippy/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
d3be840
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 8 of the Tauri/Rust migration
First real per-OS adapter: Windows keystroke injection + window enumeration (port of
injector_windows.go+keymap_windows.go), behindcfg(windows)with a no-op fallback elsewhere.What's here
injector::keymap_windows— pure VK-code / modifier / extended-key mapping (unit-tested; runs on the Windows CI runner).injector::windows_impl::WinInput(via thewindowscrate):Focus—SetForegroundWindowwith theAttachThreadInput+ foreground-lock-timeout workaround, restoring minimized windows.SendKeys—SendInputwhen the target is foreground (carries modifiers),PostMessageWM_KEYDOWN/UPwhen background (focus-preserving), matching the Go delivery-path logic.OpenWindows—EnumWindows+ Toolhelp pid→exe-name map.injector::{injector, enumerator, request_accessibility}composition entry points; non-Windows returns a no-op injector/enumerator (the macOS Accessibility impl follows in the next step).windowscrate as acfg(windows)-only dependency (the Linux CI compile is unaffected).Verification
This is OS FFI, so behavior is validated on hardware via #11 — but compilation is verified here: I cross-checked locally with
cargo check/cargo clippy --target x86_64-pc-windows-gnu(the real FFI path) andaarch64-apple-darwin+ Linux (the no-op path). Workspacefmt/clippy -D warnings/tests green; the CI matrix re-verifies all three.Part of: #10, #11, #12.
Generated by Claude Code