Skip to content

fix: preserve native browser shortcuts across keyboard layouts#326383

Open
kycutler with Copilot wants to merge 5 commits into
mainfrom
copilot/fix-browser-panel-copy-paste
Open

fix: preserve native browser shortcuts across keyboard layouts#326383
kycutler with Copilot wants to merge 5 commits into
mainfrom
copilot/fix-browser-panel-copy-paste

Conversation

Copilot AI commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Under non-Latin keyboard layouts (for example, Cyrillic), native editing shortcuts such as Ctrl+C, Ctrl+V, and Ctrl+X in the integrated browser were swallowed. event.key produces a non-Latin character in these layouts, so it did not match the preload script's Latin shortcut set.

Changes

  • Continue using event.key for Latin letters, preserving remapped layouts such as AZERTY, Dvorak, and Colemak.
  • Fall back to the physical letter from event.code only when event.key is non-Latin.
  • Leave existing navigation and native shortcut handling unchanged.

This allows native editing shortcuts to reach Chromium under non-Latin layouts without regressing rearranged Latin layouts.

Fixes #326314

…ndent)

Co-authored-by: kycutler <67761731+kycutler@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot July 17, 2026 17:47
Copilot AI changed the title [WIP] Fix Ctrl+C/V/X functionality in integrated browser panel for Cyrillic layouts fix: use event.code for browserView keyboard shortcuts to fix Ctrl+C/V/X under non-Latin layouts Jul 17, 2026
Copilot AI requested a review from kycutler July 17, 2026 17:48
@kycutler
kycutler marked this pull request as ready for review July 17, 2026 17:55
Copilot AI review requested due to automatic review settings July 17, 2026 17:55
@kycutler
kycutler enabled auto-merge (squash) July 17, 2026 17:56
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@jruales

Matched files:

  • src/vs/platform/browserView/electron-browser/preload-browserView.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes integrated-browser editing shortcuts under non-Latin keyboard layouts.

Changes:

  • Uses KeyboardEvent.code for native browser shortcuts.
  • Updates macOS emoji-picker detection.
Show a summary per file
File Description
preload-browserView.ts Changes native shortcut matching to physical key codes.

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Medium

Comment thread src/vs/platform/browserView/electron-browser/preload-browserView.ts Outdated
@kycutler

Copy link
Copy Markdown
Collaborator

@copilot I've simplified the logic. Update the pr title / description

Copilot AI commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

@copilot I've simplified the logic. Update the pr title / description

Done. Updated the PR description to reflect the hybrid approach. Suggested new title: fix: fix native editing shortcuts in browserView for non-Latin keyboard layouts

@kycutler kycutler changed the title fix: use event.code for browserView keyboard shortcuts to fix Ctrl+C/V/X under non-Latin layouts fix: preserve native browser shortcuts across keyboard layouts Jul 17, 2026
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.

Ctrl+C/V/X don't work in integrated browser panel (browserView) under non-Latin keyboard layouts (e.g. Cyrillic)

3 participants