From ced7f828d99289a55a871c946d3ee997a73e8426 Mon Sep 17 00:00:00 2001 From: ArztKlein <52363453+ArztKlein@users.noreply.github.com> Date: Wed, 29 Jun 2022 17:08:41 +1200 Subject: [PATCH] internationalise comment shortcut fixes #1167 --- client/modules/IDE/components/Editor.jsx | 3 ++- client/modules/IDE/components/KeyboardShortcutModal.jsx | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/client/modules/IDE/components/Editor.jsx b/client/modules/IDE/components/Editor.jsx index 4a8c076109..9c82183715 100644 --- a/client/modules/IDE/components/Editor.jsx +++ b/client/modules/IDE/components/Editor.jsx @@ -159,7 +159,8 @@ class Editor extends React.Component { // choose a color, it deletes characters inline. This is a // hack to prevent that. [`${metaKey}-K`]: (cm, event) => - cm.state.colorpicker.popup_color_picker({ length: 0 }) + cm.state.colorpicker.popup_color_picker({ length: 0 }), + [`${metaKey}-.`]: 'toggleComment' // Note: most adblockers use the shortcut ctrl+. }); this.initializeDocuments(this.props.files); diff --git a/client/modules/IDE/components/KeyboardShortcutModal.jsx b/client/modules/IDE/components/KeyboardShortcutModal.jsx index bc67430a88..d924a21efc 100644 --- a/client/modules/IDE/components/KeyboardShortcutModal.jsx +++ b/client/modules/IDE/components/KeyboardShortcutModal.jsx @@ -61,6 +61,10 @@ function KeyboardShortcutModal() { {metaKeyName} + / {t('KeyboardShortcuts.CodeEditing.CommentLine')} +