feat(shortcut): single/double press detection for Ctrl+G#31
Open
feat(shortcut): single/double press detection for Ctrl+G#31
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…#30) CopyFromForeground() sleeps ~150ms (Ctrl+C + wait). Capturing on every press ate into the 200ms detection window, leaving only ~50ms margin. Use atomic.Bool to capture only on the first press of each cycle. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
#30) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ble shortcuts (#30) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…gurable shortcuts (#30) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…hook (#30) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ents (#30) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ok (#30) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…cutPyramidize$, add settings fields (#30) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…corder (#30) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Three bugs fixed: - Auto-repeat: track trigger keyup in double-tap state machine. Only accept second tap after the trigger key has been physically released and pressed again (tapWaitRelease → tapWaitSecond phases). - Recording conflict: add SetPaused() to service interface. Recorder component pauses the hook during capture mode so keypresses pass through to the webview instead of being intercepted. - Diagnostic logging: add Debug-level trace logs in hook callback for modifier tracking, tap phases, and combo matching. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
FixComponent is only mounted on the /fix route. When the app is hidden or on another route, the shortcutFix$ subscription didn't exist, so the silent fix never ran. Move it to ShellComponent which is always mounted — read clipboard, enhance, write back, paste to foreground. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
#30) Outlook uses delayed clipboard rendering — the fixed 150ms sleep wasn't enough for the clipboard to be populated. Now polls GetClipboardSequenceNumber in 25ms intervals up to 1s timeout. Fast apps still finish in ~25-50ms; slow apps like Outlook get the full second. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When the shortcut combo includes Shift or Alt (e.g. Ctrl+Shift+G for pyramidize), those modifiers are still physically held when CopyFromForeground sends Ctrl+C. The target app sees Ctrl+Shift+C instead of Ctrl+C, which Outlook and other apps silently ignore. Fix: inject Shift-up and Alt-up events before Ctrl+C (and Ctrl+V) so the receiving app always gets a clean Ctrl+C/Ctrl+V regardless of which modifiers the shortcut combo used. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…wn (#30) Gives the user time to release modifier keys before CopyFromForeground runs, reducing the chance of Ctrl+Shift+C instead of Ctrl+C. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Closes #30
Summary
internal/features/shortcut/detect.go) — classifies raw hotkey presses as Single or Double via channels/timersmain.goshortcut goroutine: clipboard captured on first press,shortcut:singleorshortcut:doubleemitted as distinct Wails events, window focused on double pressWailsServiceexposesshortcutSingle$/shortcutDouble$replacing the old undifferentiatedshortcutTriggered$;FixComponentsubscribes to single,TextEnhancementComponentsubscribes to double,ShellComponentnavigates to/enhanceon double pressTest Plan
go test ./internal/features/shortcut/ -run TestDetector🤖 Generated with Claude Code