Skip to content

Keyboard layout - replace all dashes/dots in macOS layout labels#303971

Merged
rzhao271 merged 1 commit intomicrosoft:mainfrom
xingsy97:wt/keyboard-layout-regex
Mar 23, 2026
Merged

Keyboard layout - replace all dashes/dots in macOS layout labels#303971
rzhao271 merged 1 commit intomicrosoft:mainfrom
xingsy97:wt/keyboard-layout-regex

Conversation

@xingsy97
Copy link
Member

Add the missing global flag to two regex replacements in macOS keyboard layout label generation.

Without /g, String.prototype.replace only replaces the first match:

  • "US-International-PC" displayed as "US International-PC" instead of "US International PC"
  • "Kotoeri.Roman-English" displayed as "Kotoeri Roman-English" instead of "Kotoeri Roman English"

Same class of bug as #303603 which fixed a similar missing /g in settingsTreeModels.ts.

Copilot AI review requested due to automatic review settings March 23, 2026 06:41
@vs-code-engineering vs-code-engineering bot added this to the 1.114.0 milestone Mar 23, 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

Fixes macOS keyboard layout label formatting by ensuring all dashes/dots are replaced when generating display labels from macOS layout IDs (matching the “missing /g” class of bug referenced in #303603).

Changes:

  • Use a global /-/g replacement for com.apple.keylayout.* layout IDs.
  • Use a global /[-\.]/g replacement for *.inputmethod.* layout IDs.

@xingsy97 xingsy97 marked this pull request as ready for review March 23, 2026 06:52
@rzhao271 rzhao271 merged commit ee7a0d3 into microsoft:main Mar 23, 2026
21 of 22 checks passed
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.

4 participants