From 09c5bf72d2eaf0902fce78c8e2d2d1bcc41bea1c Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Wed, 3 May 2023 09:26:54 +0100 Subject: [PATCH] [cm6] Use Cmd on macOS for cloneSelectionVertically (#12855) GitOrigin-RevId: ea72da47f2ebb377cf22af061ab616a021950502 --- .../source-editor/extensions/shortcuts.ts | 38 ++++++++----------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/services/web/frontend/js/features/source-editor/extensions/shortcuts.ts b/services/web/frontend/js/features/source-editor/extensions/shortcuts.ts index 01b84bf199..e6a904c9b2 100644 --- a/services/web/frontend/js/features/source-editor/extensions/shortcuts.ts +++ b/services/web/frontend/js/features/source-editor/extensions/shortcuts.ts @@ -50,25 +50,22 @@ export const shortcuts = () => { run: indentLess, }, { - key: 'Ctrl-y', - mac: 'Mod-y', + key: 'Mod-y', preventDefault: true, run: redo, }, { - key: 'Ctrl-Shift-z', + key: 'Mod-Shift-z', preventDefault: true, run: redo, }, { - key: 'Ctrl-Shift-/', - mac: 'Mod-Shift-/', + key: 'Mod-Shift-/', preventDefault: true, run: toggleLineComment, }, { - key: 'Ctrl-ß', - mac: 'Mod-ß', + key: 'Mod-ß', preventDefault: true, run: toggleLineComment, }, @@ -88,46 +85,42 @@ export const shortcuts = () => { run: changeCase(false), // lowercase }, { - key: 'Ctrl-d', - mac: 'Mod-d', + key: 'Mod-d', preventDefault: true, run: deleteLine, }, { - key: 'Ctrl-j', - mac: 'Mod-j', + key: 'Mod-j', preventDefault: true, run: toggleReviewPanel, }, { - key: 'Ctrl-Shift-c', - mac: 'Mod-Shift-c', + key: 'Mod-Shift-c', preventDefault: true, run: addNewCommentFromKbdShortcut, }, { - key: 'Ctrl-Shift-a', - mac: 'Mod-Shift-a', + key: 'Mod-Shift-a', preventDefault: true, run: toggleTrackChangesFromKbdShortcut, }, { - key: 'Ctrl-Alt-ArrowUp', + key: 'Mod-Alt-ArrowUp', preventDefault: true, run: cloneSelectionVertically(false, true), }, { - key: 'Ctrl-Alt-ArrowDown', + key: 'Mod-Alt-ArrowDown', preventDefault: true, run: cloneSelectionVertically(true, true), }, { - key: 'Ctrl-Alt-Shift-ArrowUp', + key: 'Mod-Alt-Shift-ArrowUp', preventDefault: true, run: cloneSelectionVertically(false, false), }, { - key: 'Ctrl-Alt-Shift-ArrowDown', + key: 'Mod-Alt-Shift-ArrowDown', preventDefault: true, run: cloneSelectionVertically(true, false), }, @@ -142,8 +135,7 @@ export const shortcuts = () => { run: selectOccurrence(true), }, { - key: 'Ctrl-Shift-d', - mac: 'Mod-Shift-d', + key: 'Mod-Shift-d', run: duplicateSelection, }, { @@ -171,11 +163,11 @@ export const shortcuts = () => { shift: selectSyntaxRight, }, { - mac: 'Mod-Backspace', + mac: 'Cmd-Backspace', run: deleteToVisualLineStart, }, { - mac: 'Mod-Delete', + mac: 'Cmd-Delete', run: deleteToVisualLineEnd, }, ]