Fix AdvancedPaste auto-copy failing on Electron/Chromium apps#46486
Merged
yeelam-gordon merged 1 commit intomainfrom Apr 16, 2026
Merged
Fix AdvancedPaste auto-copy failing on Electron/Chromium apps#46486yeelam-gordon merged 1 commit intomainfrom
yeelam-gordon merged 1 commit intomainfrom
Conversation
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
be5240e to
5f3289c
Compare
The Ctrl+C fallback in send_copy_selection() was injecting keystrokes without first releasing modifier keys held from the hotkey combination. Target apps received e.g. Win+Shift+Ctrl+C instead of Ctrl+C, which doesn't trigger a copy. Changes: - Release all modifier keys before Ctrl+C and restore them after, matching the existing try_to_paste_as_plain_text() pattern - Extract send_ctrl_c_input() and poll_clipboard_sequence() helpers from inline code for clarity - Increase clipboard polling window from 150ms to 500ms for slower Chromium/Electron clipboard updates - Add warn-level logging on failure paths for customer diagnostics - Check WM_COPY actually changed the clipboard before declaring success Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
5f3289c to
bf34514
Compare
LegendaryBlair
approved these changes
Apr 16, 2026
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.
Summary
Fixes AdvancedPaste custom action auto-copy failing on Electron/Chromium apps (e.g. Teams, VS Code, browsers).
Problem
The Ctrl+C fallback in \send_copy_selection()\ injected keystrokes without first releasing modifier keys held from the hotkey combination. Target apps received e.g. \Win+Shift+Ctrl+C\ instead of \Ctrl+C, so the copy never triggered.
Changes
Validation