Skip to content

Conversation

@kycutler
Copy link
Contributor

@kycutler kycutler commented Jan 9, 2026

Fixes #286633

jruales
jruales previously approved these changes Jan 9, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes native editor shortcuts (copy, paste, cut, undo, redo, select all) in the integrated browser by moving from a workbench-level command interception approach to a native input event filtering approach in the Electron main process.

Key Changes:

  • Removes workbench-level command redirection logic that was forwarding events from BrowserEditor
  • Adds native shortcut filtering in the Electron main process before input events are captured and forwarded to VS Code's keybinding system
  • Filters Alt-only inputs and common Ctrl/Cmd shortcuts (A, C, V, X, Z) to allow native browser handling

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/vs/workbench/contrib/browserView/electron-browser/browserView.contribution.ts Removes command redirection code and unused imports (ServicesAccessor, IEditorService, MultiCommand, clipboard actions)
src/vs/platform/browserView/electron-main/browserView.ts Adds ignoreNativeShortcut function to filter native shortcuts and prevents their interception in before-input-event handler

@kycutler kycutler enabled auto-merge (squash) January 10, 2026 00:03
@kycutler kycutler merged commit 4d24baf into main Jan 10, 2026
22 checks passed
@kycutler kycutler deleted the kycutler/copypastefix branch January 10, 2026 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrated Browser: copy/paste keyboard shortcuts not working

3 participants