Skip to content

Commit fd23e62

Browse files
authored
On windows, use alt instead of ctrl for keep/undo changes/hunks (microsoft#249806)
fixes microsoft/vscode-copilot#13815 fixes microsoft#248041
1 parent e806b1b commit fd23e62

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,12 @@ abstract class KeepOrUndoAction extends ChatEditingEditorAction {
180180
weight: KeybindingWeight.WorkbenchContrib,
181181
primary: _keep
182182
? KeyMod.CtrlCmd | KeyCode.Enter
183-
: KeyMod.CtrlCmd | KeyCode.Backspace
183+
: KeyMod.CtrlCmd | KeyCode.Backspace,
184+
win: {
185+
primary: _keep
186+
? KeyMod.Alt | KeyCode.Enter
187+
: KeyMod.Alt | KeyCode.Backspace
188+
},
184189
},
185190
menu: {
186191
id: MenuId.ChatEditingEditorContent,
@@ -241,7 +246,12 @@ abstract class AcceptRejectHunkAction extends ChatEditingEditorAction {
241246
weight: KeybindingWeight.WorkbenchContrib + 1,
242247
primary: _accept
243248
? KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Enter
244-
: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Backspace
249+
: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Backspace,
250+
win: {
251+
primary: _accept
252+
? KeyMod.Alt | KeyMod.Shift | KeyCode.Enter
253+
: KeyMod.Alt | KeyMod.Shift | KeyCode.Backspace,
254+
}
245255
},
246256
menu: {
247257
id: MenuId.ChatEditingEditorHunk,

0 commit comments

Comments
 (0)