diff --git a/client/modules/IDE/components/Editor.jsx b/client/modules/IDE/components/Editor.jsx index 5bb26adc4f..e1899e0bfe 100644 --- a/client/modules/IDE/components/Editor.jsx +++ b/client/modules/IDE/components/Editor.jsx @@ -158,7 +158,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')} +
  • + {metaKeyName} + . + {t('KeyboardShortcuts.CodeEditing.CommentLine')} +
  • {metaKeyName} + K {t('KeyboardShortcuts.CodeEditing.ColorPicker')}