Fifteen call sites each had their own temp-file-and-rename code. Some
used a fixed temporary name, so two writers could mix their content, and
most did not flush before the rename. They now share atomicfile.Write.
An architecture test keeps new os.Rename calls out of other packages.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Add per-VM `capture_host_shortcuts` option persisted in `.reims-go-keymap.json`
(independent from modifier preset and backward-compatible with legacy configs
and Wails callers omitting the field). When enabled, unmapped Win and Alt keys
route through the existing Guest Tools v8 hidutil carrier (`lcmd`/`rcmd`/`lopt`/
`ropt`) while the VM is focused, preventing host Win/Alt shortcuts (e.g. PixPin
Alt+A, Alt+Tab, Alt+F4, Ctrl+Alt+A, Win+...) without modifying explicit custom
bindings or bumping Guest Tools version.
- Monitor `EVENT_SYSTEM_FOREGROUND` and `EVENT_OBJECT_NAMECHANGE` on the Windows
keymap hook thread to immediately release held modifiers on focus loss and
promote `WH_KEYBOARD_LL` back to the top of the hook chain on VM focus entry
and SDL3 in-window re-capture, with per-key timestamp filtering for delayed
focus-loss events, swap-window event deduplication, Win64 32-bit parameter
narrowing, and fallback timer recovery.
- Serialize `SetVMKeymap` read-merge-save under `keymapMu`, expose the toggle in
Settings with zh-CN/en-US i18n, and add Go + frontend unit tests.