4559 Commits

Author SHA1 Message Date
Carlos Zamora
a8a47b9367
[SUI] Improve accessibility to open json (#18828)
The "open JSON" button in the settings UI wasn't working when invoked
via accessibility tools (specifically Narrator in scan mode and Voice
Access). For some reason, in those scenarios, neither the `Tapped` or
`KeyDown` event were hit!

This PR adds the logic to open the json file via the `ItemInvoked` event
instead. The `Tapped` and `KeyDown` handlers were removed to prevent a
redundant `OpenJson` event being raised.

Additionally, `SelectsOnInvoked` was set to `False` on the "open JSON"
nav item. This prevents the selection pill from moving to the nav item,
which feels more correct.

## Validation Steps Performed
The following scenarios are confirmed to open the JSON
 Mouse click
 Keyboard (Spacebar and Enter)
 Voice Access
 Narrator in scan mode

For all of these (except Voice Access), I've confirmed that holding the
Alt button while invoking the JSON button opens defaults.json.

Closes #18770
Closes #12003
2025-04-23 19:34:47 +00:00
Leonard Hecker
773a4b9198
Implement DECSET 2026 - Synchronized Output (#18826) 2025-04-23 12:15:51 -05:00
Heiko
68d9e0d038
[Enterprise, GPO] Add "Default Terminal app" policy to definition template (#18363)
This PR adds a new policy definition to the ADMX templates for settings
the default Terminal application in Windows.

> [!Note]
> This PR does not change any code of Windows, Console Host or Windows
Terminal. It only adds the definition for a new policy to the templates.

I got the registry values form the documentation and by testing the
values.

The policy is only available as user policy because the registry values
have to be in HKCU.

The Policy is implemented as preference (not inside the Policy key) and
therefore keeps it's value on removing (not configured) it. You can see
this in `gpedit.msc` on the policy symbol and the hint in the
description.

Closes #18302
Refs #18303
2025-04-18 23:01:12 +00:00
Windows Console Service Bot
712ce5fa2f
Localization Updates - main - 04/16/2025 21:02:38 (#18807) 2025-04-18 15:13:59 -05:00
Leonard Hecker
3accdcfc6b
Fix cwd not applying on launch (#18801) 2025-04-15 20:22:09 +00:00
Carlos Zamora
0b4f9662c7
Fix color selection off-by-one error and dangling Y-beam (#18798) 2025-04-14 23:17:57 -05:00
Leonard Hecker
354e05d713
Fix CRLF translation when DISABLE_NEWLINE_AUTO_RETURN is reset (#18781)
We can't do the `pos.x != 0` check. Instead, I replaced it with
a CR check to avoid redundant CRs during CRLF translation.

Closes #18735

## Validation Steps Performed
* Run the repro in the linked issue
2025-04-15 02:57:30 +02:00
Leonard Hecker
8b01f546cb
Backup and restore attributes during cooked reads (#18797)
Use DECSC/DECRC and XTPUSHSGR/XTPOPSGR while redrawing
popups, since they're drawn using the current popup colors.

I wish we could just use the reverse video rendition...

Closes #18742

## Validation Steps Performed
* Run `color 3f` and then press F7
* Works fine in conhost (VtPipeTerm) 
* Works as expected (black background) in VS Code 
2025-04-14 23:59:46 +00:00
Dustin Hall
f7e853cd9f
Add 2 additional error messages (#18462)
Add additional information to 2 error scenarios when launching a
different profile in the `ConptyConnection.cpp` file.
  - Requires Elevation
  - File Not Found

Created a profile that required elevation and verified the error
message. Created profile that passed a made up command and verified the
error message.

Closes #7186
2025-04-14 23:15:11 +00:00
Leonard Hecker
90c312f7da
Fix wide char support for WriteConsoleOutputAttribute (#18796)
When we overwrite the attributes during the fill,
we must retain the lead/trail byte attributes.

Closes #18746

## Validation Steps Performed
* Added a unit test 
2025-04-14 14:12:01 -07:00
abutcher-gh
6682bed311
TerminalControl: Support MinGW path translation style (C:\ -> C:/) (#18759)
## Summary of the Pull Request

Support drag-n-drop path translation in the style used by MinGW
programs. In particular for usage with shells like `ash` from busybox
(https://frippery.org/busybox/).

## Detailed Description of the Pull Request / Additional comments

Provides a new option "mingw" for "pathTranslationStyle".
Shown as "MinGW" with translation documented as `(C:\ -> C:/)` in the
UI.
As per the other modes, this translates `\` to `/` but stops there.
There is no prefix/drive translation.

## Validation Steps Performed

Run using `busybox ash` shell. Dragged directories and files from both
local disks and network shares onto terminal. All were appropriately
single quoted and had their backslashes replaced with forward slashes.
They were directly usable by the `ash` shell.

Language files containing the other options have been updated to include
the new one.

## PR Checklist
- [ ] Closes #xxx
- [ ] Tests added/passed
- [x] Documentation updated
   - [Docs PR #849](https://github.com/MicrosoftDocs/terminal/pull/849)
- [ ] Schema updated (if necessary)

Co-authored-by: Adam Butcher <adam@jessamine.uk>
2025-04-14 14:11:51 -07:00
Vamsi Krishna Kanjeevaram
f83b98e100
Add a right margin to the suggestion description textblock (#18780)
This ensures that the vertical scrollbar will not cover the description text.
Closes #18545
2025-04-14 19:08:14 +00:00
Vamsi Krishna Kanjeevaram
ad19d2c967
Display local time instead of UTC while restoring previous session (#18775)
Closes #18727
2025-04-10 00:33:40 +00:00
Dustin L. Howett
5f311506dc
Add support for OSC 104, 110, 111, 112 and 117 (resets) (#18767)
This pull request adds support for resetting the various color table
entries and xterm resource values back to their defaults.

Building on the default color table James introduced in #17879, it was
relatively straightforward to add support for resetting specific
entries.

This implementation cleaves tightly to observed behavior in xterm(379)
rather than observed behavior in libvte(0.70.6). They differ in the
following ways:

- xterm rejects any OSC [110..119] with any number of parameters; libvte
accepts it but only resets the first color.
- When passed a list of color indices to reset in 104, xterm resets any
colors up until the first one which fails to parse as an integer and
does _not_ reset the rest; libvte resets all parseable color indices.

I was unable to verify how these reset commands interact with colors set
via `DECAC Assign Color` so I went with the implementation that made the
most sense:

- Resetting the background color with `110` also restores the background
color alias entry to its pre-`DECAC` value; this results in the
perceived background color returning to e.g. index 0 in conhost and the
`background` color in Terminal.
- _ibid._ for the foreground color

Refs #18695
Refs #17879
Closes #3719
2025-04-10 00:11:47 +00:00
Dustin L. Howett
22c509f426
build: run official builds with the R1 network isolation policy (#18753)
This required removing connections during the build to `nuget.org` and
`powershellgallery.com`.

The NuGet Tool task was downloading nuget from `nuget.org`
unconditionally.

The `AzureFileCopy` task was downloading `Az.Accounts` from
`powershellgallery.com` unconditionally.

Both of these tasks have better options nowadays.

Tested and passed in OneBranch on 2025-04-01.
2025-04-01 22:01:20 +00:00
Dustin L. Howett
f34dbbf3ac
vcpkg: add an overlay port for fmt 11.1.4; enable /W3 (#18729)
This pull request brings us up to fmt 11.1.4 and enables `FMT_PEDANTIC`.

`FMT_PEDANTIC` turns on `/W3`, which is required by our local feudal
lords who will automatically file bugs on us if we don't build with
enough warnings enabled.
2025-03-26 17:37:21 -05:00
Muhammad Danish
6eb6512d12
Add WinGet configuration files for building terminal (#18645)
PR adds a WinGet configuration file to install the necessary
dependencies in order to build terminal locally. The configuration file
enables developer mode, installs PowerShell 7, Visual Studio 2022 & all
the required workloads from the .vsconfig file (in accordance with
the dependencies listed in the README).

## Validation Steps Performed
Tested the configuration file by spinning up a clean Win11 Pro VM in
azure and then doing the following:

1. Install latest WinGet on the VM using WinGet sandbox script.
   Install git and clone the repo
2. Run `winget configure .config/configuration.winget` (this should work
   by just double-clicking the file in explorer too)
3. After the configuration is completed, open the solution in the now
   installed Visual Studio and build. The build is successful and I could
   start terminal with F5

Co-authored-by: Demitrius Nelon <denelon@microsoft.com>
2025-03-21 11:57:04 -05:00
Dustin L. Howett
75d8fc29f5
Delay-load icu so that we don't fail to start up on Windows <1903 (#18707) 2025-03-20 19:57:06 -05:00
Javier
6e89242373
Multiple fixes to address DD CodeQL requirements (#18451)
After taking in 1.22, our CodeQL process caught a few locations where we
weren't following the right guidance:
- Performing integer comparisons of different sizes which could lead to
an infinite loop if the larger integer goes out of range of the smaller
integer
- Not checking HResult of a called method

Co-authored-by: aphistra <102989060+aphistra@users.noreply.github.com>
2025-03-18 13:26:31 -05:00
Éléa Dufresne
a86c90a045
Preview actions from the command palette on mouse hover (#18518)
Allow users to preview color schemes by hovering over them with the
mouse pointer in the Command Palette.

- This PR handles issue #18238. 
- This extends the previously closed issue #6689, which allowed the `UP`
and `DOWN` arrows to trigger a preview of color schemes in the Command
Palette.

This works by attaching event handlers for `PointerEntered` and
`PointerExited` to `ListViewItem` containers. When the mouse pointer
moves into the item's bounding area, the `PreviewAction` handler is
triggered to showcase the hovered color scheme. Conversely, when the
mouse pointer leaves the item's area, the `PreviewAction` is executed on
the selected item (generally from the `UP` and `DOWN` arrows).

**Important note:**

- This also provides previews for the other features that the
`ActionPreviewHandler` handles, such as the background opacity of the
terminal.

## Validation Steps Performed

- Hover a color scheme, and it becomes the active one.
- Pressing `ESC` at any point to dismiss the command palette, and the
scheme returns to the previous one.
- I did not add any additional test, though all existing ColorScheme
tests passed.

Closes #18238
2025-03-15 00:00:10 +00:00
Leonard Hecker
70f85a4a35
Fix a shutdown race condition in ControlCore (#18632)
I found multiple issues while investigating this:
* Render thread shutdown is racy, because it doesn't actually stop the
render thread.
* Lifetime management in `ControlCore` failed to account for the
circular dependency of render thread --> renderer --> render data -->
terminal --> renderer --> render thread. Fixed by reordering the
`ControlCore` members to ensure their correct destruction.
* Ensured that the connection setter calls close on the previous
connection.

(Hopefully) Closes #18598

## Validation Steps Performed
* Can't repro the original failure 
* Opening and closing tabs as fast as possible doesn't crash anymore 
* Detaching and reattaching a tab producing continuous output 
2025-03-14 15:06:01 -07:00
Dustin L. Howett
7d8f7eb429
Add support for language override to unpackaged/portable builds (#18684)
It turns out that we *can* support language overrides--fairly easily, in
fact!--by simply changing the default Language qualifier.

I elected not to change how packaged language override works until we
are certain this works properly everywhere. Consider it a healthy
distrust of the Windows App Platform.

Closes #18419
Closes #18336
Closes #17619
2025-03-14 15:03:26 -07:00
aphistra
f023b3bfd2
Remove unused MUXCustomBuildTasks package (#18683)
It has a Component Governance alert (and no license), plus we aren't using it.
2025-03-13 16:46:16 -05:00
Leonard Hecker
32ae00f71a
Fix a ConPTY startup hang with 0-param DA1 responses (#18681)
Since `WaitForDA1` would wait until `_deviceAttributes` is non-zero,
we must ensure it's actually non-zero at the end of this handler,
even if there are no parameters.

## Validation Steps Performed
* Mod the Terminal DA1 to be `\x1b[?6c`. No hang 
* Mod the Terminal DA1 to be `\x1b[?61c`. No hang 
2025-03-12 16:29:36 -07:00
Leonard Hecker
2693210ead
Fix a handoff deadlock if layout completes synchronously (#18676)
I've received a dump from an affected user, and it showed that the
layout event in TerminalPage was raised synchronously. This meant that
during page initialization, the handoff listener was started while still
being stuck inside the handoff listener. This resulted in a deadlock.

This PR fixes the issue by not holding the lock across handoff callback
calls.

Closes #18634

## Validation Steps Performed
* Can't repro 
2025-03-12 16:27:12 -07:00
Leonard Hecker
3760caed97
Fix dialogs not working across multiple windows (#18636)
This can be considered "part 1" of fixing #18599: It prevents crashes
(due to unhandled exceptions) by ensuring we only create 1 content
dialog across all windows at a time. Sounds bad, but I tried it and it's
not actually _that_ bad in practice (it's still really gross though).

The bad news is that I don't have a "part 2", because I can't figure out
what's going on:
* Create 2 windows
* Open the About dialog in window 1
  and right click the text
* Close the About dialog
* Open the About dialog in window 2
  and right click the text
* WinUI will simply toss the focus to window 1

It appears as if context menus are permanently associated with the first
window that uses them. It has nothing to do with whether a ContentDialog
instance is reused (I tested that).

## Validation Steps Performed
* Open 2 windows with 2 tabs each
* Attempt to close window 1, dialog appears 
* Attempt to close window 2, dialog moves to window 2 
2025-02-28 15:14:16 -08:00
Leonard Hecker
96d1407c59
Fix bugs introduced in #18623 (#18635)
The logic didn't work when persistence was enabled and you had 2 windows
and closed the 2nd one, or when dragging the last tab out of the only
window.

## Validation Steps Performed
* 2 windows, close the 2nd one, app doesn't exit 
* 1 window, 1 tab, drag the tab out of the window, app doesn't exit 
2025-02-28 23:19:35 +01:00
Leonard Hecker
e1be2f4c73
Fix persistence of the last closed window (#18623)
Does what it says on the tin.

Closes #18525

## Validation Steps Performed
* Enable persistence
* Close the last window
* Persisted 
2025-02-26 11:05:59 -08:00
Leonard Hecker
e1b28e72b3
Fix panes being dropped when tearing off tabs (#18627)
I don't actually know why this is happening, because it doesn't
happen with startup actions specified in the settings file.
In any case, it's fixed with more delays.

Closes #18572

## Validation Steps Performed
* Create a tab with 2 panes
* Tear it off into a new window
* New window has 1 tab with 2 panes 
2025-02-26 10:58:34 -08:00
Carlos Zamora
e5b972a828
Bugfix: don't round to nearest cell for mouse movements and VT mouse mode (#18602)
Missed a few `_getTerminalPosition()` on the first run. Disabled
rounding for pointer movements and mouse wheel events (which are used
for hyperlink hover detection and vt mouse mode). The only time we round
now is...
- `SetEndSelectionPoint()` --> because we're updating a selection
- `ControlCore->LeftClickOnTerminal()` --> where all paths are used for
selection*

*the only path that doesn't is `RepositionCursorWithMouse` being
enabled, which also makes sense based on clicking around Notepad with a
large font size.

## References and Relevant Issues
Follow-up for #18486 
Closes #18595 

## Validation Steps Performed
In large font size, play around with midnight commander and hover over
hyperlink edges.
2025-02-26 10:51:10 -08:00
Leonard Hecker
ff9664d2d4
Fix two sources of runtime exceptions (#18628)
* `_ApplyLanguageSettingChange` calls `PrimaryLanguageOverride`
  (the WinRT API function) and we would call it every time a new
  window is created. Now it's only called on settings load.
* `_RegisterTabEvents` would listen for "Content" changes which can
  be null. `IVector::Append` throws if a null object is given.
  In our case, it's null if the content got erased with nothing.

Additionally, this fixes a bug where we wouldn't call
`_ProcessLazySettingsChanges` on startup. This is important if the
settings file was changed while Windows Terminal wasn't running.

Lastly, there's a lifetime fix in this PR, which is a one-line change
and I didn't want to make a separate PR for that.
2025-02-25 20:50:25 +01:00
Leonard Hecker
0df82681fe
Reduce log spam on conhost exit (#18629)
When the server handle gets closed on conhost (= terminal is gone),
and e.g. PowerShell is used, we would previously log 6 error messages.
This PR reduces it to zero, by removing the 3 biggest offenders.
2025-02-25 20:50:06 +01:00
Carlos Zamora
35bd60782f
Add support for tabbing to embedded hyperlinks (#18347)
## Summary of the Pull Request
There's already logic to tab to a hyperlink when we're in mark mode. We
do this by looking at the automatically detected hyperlinks and finding
the next one of interest. This adds an extra step afterwards to find any
embedded hyperlinks and tab to them too.

Since embedded hyperlinks are stored as text attributes, we need to
iterate through the buffer to find the hyperlink and it's buffer
boundaries. This PR tries to reduce the workload of that by first
finding the automatically detected hyperlinks (since that's a fairly
quick process), then using the reduced search area to find the embedded
hyperlink (if one exists).

## Validation Steps Performed
In PowerShell, add an embedded hyperlink as such:
```powershell
${ESC}=[char]27
Write-Host "${ESC}]8;;https://github.com/microsoft/terminal${ESC}\This is a link!${ESC}]8;;${ESC}\"
```
Enter mark mode (ctrl+shift+m) then shift+tab to it.
 The "This is a link!" is selected
 Verified that this works when searching forwards and backwards

Closes #18310
Closes #15194 
Follow-up from #13405
OSC 8 support added in #7251
2025-02-24 15:55:45 -08:00
Leonard Hecker
62e7f4bfad
Fix a crash when closing tabs (#18620)
WinUI asynchronously updates its tab view items, so it may happen that
we're given a `TabViewItem` that still contains a `TabBase` which has
actually already been removed. Regressed in #15924.

Closes #18581

## Validation Steps Performed
* Close tabs rapidly with middle click
* No crash 
2025-02-24 18:31:32 +00:00
Leonard Hecker
265d841509
Fix persistence of empty windows (#18622)
This is a theoretical fix for #18584 as I cannot reproduce the issue
anymore. It did happen briefly on one of my devices though, and at the
time I observed that it would persist a window with no startup actions.
2025-02-24 18:27:45 +00:00
Leonard Hecker
c7f0d0addb
Fix leaking the contents of the first tab in the first window (#18621)
Found this one completely randomly.

## Validation Steps Performed
* Open 2 windows with 1 tab each
* Click the X button on the tab in the 1st window
* OpenConsole/etc. is cleaned up 

---------

Co-authored-by: Dustin L. Howett <duhowett@microsoft.com>
2025-02-24 18:27:36 +00:00
Windows Console Service Bot
4bcdd7a844
Localization Updates - main - startOnUserLogin (#18609) 2025-02-21 16:58:50 -06:00
Leonard Hecker
733a5e7bec
ConPTY: Fix shutdown if killed during startup (#18588)
During startup we relinquish ownership of the console lock to wait for
the DA1 response of the hosting terminal. The problem occurs if the
hosting terminal disconnects during that time. The broken pipe will
cause `VtIo` to send out `CTRL_CLOSE_EVENT` messages, but those won't
achieve anything, because the first and only client hasn't even finished
connecting yet. What we need to do instead is to return an error code.

In order to not use a bunch of booleans to control this behavior, I gave
`VtIo` a state enum. This however required restructuring the calling
code in order to not have a dozen states.

## Validation Steps Performed
* Launch cmd.exe with ConPTY
* ...but leave the stdin pipe unbound (which will hang the DA1 request)
* Immediately kill the ConPTY session
* cmd.exe exits after clicking away the error message 
2025-02-21 16:57:37 -06:00
Dustin L. Howett
a46fac25d3
Remove startOnUserLogin from the settings; use OS APIs only (#18530)
Before we had a Settings UI, we added support for a setting called
`startOnUserLogin`. It was a boolean, and on startup we would try to
yeet the value of that setting into the Windows API responsible for
registering us as a startup task.

Unfortunately, we failed to take into account a few things.

- Startup tasks can be independently controlled by the user in Windows
Settings or by an enterprise using enterprise policy
- This control is not limited to *disabling* the task; it also supports
enabling it!

Users could enable our startup task outside the settings file and we
would never know it. We would load up, see that `startOnUserLogin` was
`false`, and go disable the task again. 🤦

Conversely, if the user disables our task outside the app _we can never
enable it from inside the app._ If an enterprise has configured it
either direction, we can't change it either.

The best way forward is to remove it from our settings model and only
ever interact with the Windows API.

This pull request replaces `startOnUserLogin` with a rich settings
experience that will reflect the current and final state of the task as
configured through Windows. Terminal will enable it if it can and
display a message if it can't.

My first attempt at this PR (which you can read in the commit history)
made us try harder to sync the state between the settings model and the
OS; we would propagate the disabled state back to the user setting when
the task was disabled in the OS or if we failed to enable it when the
user asked for it. That was fragile and didn't support reporting the
state in the settings UI, and it seems like it would be confusing for a
setting to silently turn itself back off anyway...

Closes #12564
2025-02-20 16:53:33 -06:00
Myungchul Keum
b6b8caba1e
Add CAM16 based color scheme "Dimidium" (#18563)
Okay, here is a challenge for the default color scheme.

This PR adds the [Dimidium] color scheme.

Refs #17818
Refs #18502

I adjusted colors using CAM16. I prioritized lightness so that all
colors (especially blue) has appropriate contrast with the background.

[Brief information about the Dimidium color scheme](https://github.com/dofuuz/dimidium/blob/main/README.md)

[Detailed explanation on crafting the color scheme with CAM16](https://dofuuz.github.io/color/2024/03/17/dimidium-terminal-color-scheme.html)

[Dimidium]: https://github.com/dofuuz/dimidium
2025-02-20 15:16:40 -06:00
Marcus Tillmanns
d35c01344d
Remove outdated arg comment for _ClosePseudoConsoleMembers (#18586)
Since the argument no longer exists.
2025-02-20 20:20:57 +00:00
Windows Console Service Bot
13e7c9314d
Localization Updates - main - 02/13/2025 03:05:04 (#18569) 2025-02-18 18:07:25 -06:00
João Guerra
b8ff95d6b6
Remove duplicate entries from defaults.json (#18527)
- Remove duplicated entries.
- Fix whitespace.

Co-authored-by: João Guerra <joca-bt@users.noreply.github.com>
2025-02-12 10:06:43 -08:00
Windows Console Service Bot
f28f65870a
Localization Updates - Use Scheme Color 2025-02-08 00:42:10 +00:00
Windows Console Service Bot
8b78be5f4a
PDP Localization Updates - main - 02/04/2025 00:49:01 (#18504) 2025-02-04 19:27:22 -06:00
Carlos Zamora
7423dd3b2a
Fix missing icon and truncated text on NullableColorPicker (#18476)
Fixes an issue on Windows 10 where icon on selected color chips would be
missing in the NullableColorPicker.

Fixes (or at least significantly improves the experience) text being
truncated for the special colors in the NullableColorPicker. This was
done by removing the word "Use" from the labels and adding a visual
state trigger to change the layout of the chips and buttons when the
window becomes narrow.

Related to #18318
2025-02-04 11:07:58 -08:00
Dustin L. Howett
a24fdaa7b2
Move the Preview release notes to Stable, add new Preview release notes (#18503) 2025-02-03 16:31:22 -08:00
Leonard Hecker
e60acbc12a
Add Oklab based color scheme "Ottosson" (#18502)
Campbell has been the default color scheme for a long time now,
but it has quite some issues with hue and chroma.

This PR introduces a new scheme which was created using the Oklab
color space to find colors with maximal distance to each other
and well distributed and consistent hue and chroma.
Because of this, I've named the scheme after the creator of Oklab.
 
Closes #17818
2025-02-03 15:11:27 -08:00
James Holderness
b243fb6189
Improve quality of GDI image scaling (#18495)
When Sixel images are rendered, they're automatically scaled to match
the 10x20 cell size of the original hardware terminals. If this requires
the image to be scaled down, the default GDI stretching mode can produce
ugly visual artefacts, particularly for color images. This PR changes
the stretching mode to `COLORONCOLOR`, which looks considerably better,
but without impacting performance.

The initial Sixel implementation was added in PR #17421.

## Validation Steps Performed

I've tested with a number of different images using a small font size to
trigger the downscaling, and I think the results are generally better,
although simple black on white images are still better with the default
mode (i.e. `BLACKONWHITE`), which is understandable.

I've also checked the performance with a variation of the [sixel-bench]
test, and confirmed that the new mode is no worse than the default.

[sixel-bench]: https://github.com/jerch/sixel-bench
2025-02-03 22:46:26 +00:00
Éléa Dufresne
2e92a15464
Fix Ctrl+Insert does not copy the selected text from Command Palette (#18483)
Fixes an issue where pressing `CTRL` + `Insert` does not copy text
selected in the Command Palette. Instead, it closes it, and any text
selected in the pane is copied to the clipboard.

Since `Insert` is a virtual key, I address the issue by adding a
conditional check for `CTRL` with either `Insert` or `C` (previously, it
only checked for `CTRL` with `C`) for the copy action in the Command
Palette.

## Validation Steps Performed

I followed the reproduction steps and verified that the actual behaviour
matched the expected behaviour. All existing tests passed, but no new
test was added.

Closes #9520
2025-02-03 20:22:04 +00:00