diff --git a/client/modules/IDE/components/Editor/utils/keymaps.js b/client/modules/IDE/components/Editor/utils/keymaps.js index bafe6ae136..bb17d0f753 100644 --- a/client/modules/IDE/components/Editor/utils/keymaps.js +++ b/client/modules/IDE/components/Editor/utils/keymaps.js @@ -13,7 +13,7 @@ import { moveLineDown } from '@codemirror/commands'; import { foldKeymap } from '@codemirror/language'; -import { searchKeymap } from '@codemirror/search'; +import { searchKeymap, openSearchPanel } from '@codemirror/search'; import { expandAbbreviation } from '@emmetio/codemirror6-plugin'; import { tidyCodeWithPrettier } from './tidier'; @@ -87,7 +87,8 @@ export const extraKeymaps = [ { key: 'ArrowRight', run: focusOnReferenceArrow }, indentWithTab, { key: 'Ctrl-Shift-ArrowUp', mac: 'Cmd-Ctrl-ArrowUp', run: moveLineUp }, - { key: 'Ctrl-Shift-ArrowDown', mac: 'Cmd-Ctrl-ArrowDown', run: moveLineDown } + { key: 'Ctrl-Shift-ArrowDown', mac: 'Cmd-Ctrl-ArrowDown', run: moveLineDown }, + { key: 'Ctrl-h', mac: 'Cmd-Alt-f', run: openSearchPanel } ]; export const emmetKeymaps = [{ key: 'Tab', run: expandAbbreviation }]; diff --git a/client/modules/IDE/components/KeyboardShortcutModal.jsx b/client/modules/IDE/components/KeyboardShortcutModal.jsx index 871b41c967..33c725ba7d 100644 --- a/client/modules/IDE/components/KeyboardShortcutModal.jsx +++ b/client/modules/IDE/components/KeyboardShortcutModal.jsx @@ -9,6 +9,14 @@ function KeyboardShortcutModal() { const newFileCommand = metaKey === 'Ctrl' ? `${metaKeyName} + Alt + N` : `${metaKeyName} + ⌥ + N`; const renameCommand = metaKey === 'Ctrl' ? 'F2' : 'Ctrl + F2'; + const moveLineUpCommand = + metaKey === 'Ctrl' + ? `${metaKeyName} + Shift + Up` + : `${metaKeyName} + Ctrl + Up`; + const moveLineDownCommand = + metaKey === 'Ctrl' + ? `${metaKeyName} + Shift + Down` + : `${metaKeyName} + Ctrl + Down`; return (

@@ -80,6 +88,18 @@ function KeyboardShortcutModal() { {renameCommand} {t('KeyboardShortcuts.CodeEditing.RenameVariable')} +
  • + + {moveLineUpCommand} + + {t('KeyboardShortcuts.CodeEditing.MoveLineUp')} +
  • +
  • + + {moveLineDownCommand} + + {t('KeyboardShortcuts.CodeEditing.MoveLineDown')} +
  • {t('KeyboardShortcuts.General')} diff --git a/translations/locales/en-US/translations.json b/translations/locales/en-US/translations.json index ae174ba1f7..f9c7863447 100644 --- a/translations/locales/en-US/translations.json +++ b/translations/locales/en-US/translations.json @@ -269,7 +269,9 @@ "CodeEditing": "Code Editing", "ColorPicker": "Show Inline Color Picker", "CreateNewFile": "Create New File", - "RenameVariable": "Rename Variable" + "RenameVariable": "Rename Variable", + "MoveLineUp": "Move Line Up", + "MoveLineDown": "Move Line Down" }, "General": "General", "GeneralSelection": {