Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions docs/WINDOWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ calendar matching can then be added back with Windows-native implementations.
Minimum porting checklist:

1. Move macOS-only dependencies behind `cfg(target_os = "macos")`.
2. Add Windows equivalents or feature fallbacks for global hotkeys, focus context,
microphone permission UX, meeting audio capture, screen recording, calendar
lookup, and credential storage.
2. Add Windows equivalents or feature fallbacks for focus context, microphone
permission UX, meeting audio capture, screen recording, calendar lookup, and
credential storage. (Global hotkeys are done — see "Hotkeys on Windows" below.)
3. Replace the unconditional Metal LLM build with a Windows-compatible llama.cpp
backend, likely CPU first, then optional CUDA/Vulkan later.
4. Add Windows sidecar binaries or disable the features that require the current
Expand All @@ -51,6 +51,26 @@ Minimum porting checklist:
6. Publish a Windows installer from Tauri, typically an NSIS `*-setup.exe` or an
MSI package.

## Hotkeys on Windows

Windows has no CGEventTap, so the configured bindings are registered with the
global-shortcut plugin (`RegisterHotKey`) instead of the macOS event tap. Two
consequences the UI has to live with:

- **A shortcut must contain a regular key.** `RegisterHotKey` cannot register a
bare modifier, so the macOS default (Right Control on its own) is not
expressible. Settings reports this rather than silently doing nothing.
- **Left/right modifiers are not distinguished.** "Right Alt + Slash" registers
as "Alt + Slash".
- **Registration is first-come-first-served across the whole system.** If another
running application already owns the combination, registration fails and Echo
Scribe surfaces the problem in Settings next to that shortcut.

Because a second instance of the app would lose that race against the first and
end up with no working hotkey at all, the app registers
`tauri-plugin-single-instance` and focuses the existing window instead of
starting a second process.

## Validation commands for a Windows developer

On a Windows development machine:
Expand Down
105 changes: 105 additions & 0 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ tauri-build = { version = "2", features = [] }
[dependencies]
tauri = { version = "2", features = ["protocol-asset", "tray-icon", "image-png", "macos-private-api"] }
tauri-plugin-shell = "2"
# Cross-platform URL / mailto / path opening for voice actions. Replaces
# shelling out to macOS `open`, which made launch_app/draft_email/open_url fail
# with "program not found" on Windows.
tauri-plugin-opener = "2"
tauri-plugin-dialog = "2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
Expand All @@ -46,6 +50,8 @@ tauri-plugin-store = "2"
tauri-plugin-autostart = "2"
tauri-plugin-notification = "2"
tauri-plugin-global-shortcut = "2"
# Keeps a second launch from stealing/losing the global hotkey registration.
tauri-plugin-single-instance = "2"
# ASR / Parakeet via ONNX Runtime. CPU-only — `ort-coreml` was dropped after
# logs showed CoreML accepted only 15/39 encoder ops and 4/35 decoder ops, and
# spent ~50s on first-run graph compilation while still running most of the
Expand Down Expand Up @@ -107,6 +113,16 @@ block2 = "0.6"
core-graphics = "0.24"
core-foundation = "0.10"

[target.'cfg(target_os = "windows")'.dependencies]
# UI Automation, for reading the focused control's text selection without
# synthesizing Ctrl+C (see src/input/uia.rs). Win32 counterpart to the
# objc2-application-services AXUIElement usage on macOS.
windows = { version = "0.58", features = [
"Win32_Foundation",
"Win32_System_Com",
"Win32_UI_Accessibility",
] }

[target.'cfg(not(target_os = "macos"))'.dependencies]
# Non-macOS starts with a CPU-compatible llama.cpp baseline. GPU backends
# such as CUDA or Vulkan should be enabled only after Windows CI is green.
Expand Down
Loading
Loading