From 680a02892c436e83b19a6d89ca62971273003458 Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Wed, 3 May 2023 10:16:06 +0100 Subject: [PATCH] Duplicate the cloneSelectionVertically key mapping to re-allow Ctrl on macOS (#12918) GitOrigin-RevId: 747e8889b5e3b34dd9ffef888f4a1d42fea1af74 --- .../source-editor/extensions/shortcuts.ts | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) 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 e6a904c9b2..17a0fb59d2 100644 --- a/services/web/frontend/js/features/source-editor/extensions/shortcuts.ts +++ b/services/web/frontend/js/features/source-editor/extensions/shortcuts.ts @@ -124,6 +124,27 @@ export const shortcuts = () => { preventDefault: true, run: cloneSelectionVertically(true, false), }, + // duplicates of the above commands, allowing Ctrl on macOS for backwards compatibility + { + mac: 'Ctrl-Alt-ArrowUp', + preventDefault: true, + run: cloneSelectionVertically(false, true), + }, + { + mac: 'Ctrl-Alt-ArrowDown', + preventDefault: true, + run: cloneSelectionVertically(true, true), + }, + { + mac: 'Ctrl-Alt-Shift-ArrowUp', + preventDefault: true, + run: cloneSelectionVertically(false, false), + }, + { + mac: 'Ctrl-Alt-Shift-ArrowDown', + preventDefault: true, + run: cloneSelectionVertically(true, false), + }, { key: 'Ctrl-Alt-ArrowLeft', preventDefault: true,