Skip to content

Commit 8b0fc20

Browse files
eleadufresneDHowett
authored andcommitted
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 (cherry picked from commit 2e92a15) Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgW9xcU Service-Version: 1.23
1 parent 7763884 commit 8b0fc20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/cascadia/TerminalApp/CommandPalette.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ namespace winrt::TerminalApp::implementation
359359
_switchToMode(CommandPaletteMode::CommandlineMode);
360360
e.Handled(true);
361361
}
362-
else if (key == VirtualKey::C && ctrlDown)
362+
else if ((key == VirtualKey::C || key == VirtualKey::Insert) && ctrlDown)
363363
{
364364
_searchBox().CopySelectionToClipboard();
365365
e.Handled(true);

0 commit comments

Comments
 (0)