Skip to content

Commit

Permalink
[processing#1167]Add second shortcut for toggling comments
Browse files Browse the repository at this point in the history
Add another extraKeys entry for toggleComment and add an entry in the keyboard reference
  • Loading branch information
Maiko Hübinger committed Jan 6, 2022
1 parent f373938 commit cdc5109
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/modules/IDE/components/Editor.jsx
Expand Up @@ -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'
});

this.initializeDocuments(this.props.files);
Expand Down
1 change: 1 addition & 0 deletions client/modules/IDE/components/KeyboardShortcutModal.jsx
Expand Up @@ -59,6 +59,7 @@ function KeyboardShortcutModal() {
</li>
<li className="keyboard-shortcut-item">
<span className="keyboard-shortcut__command">{metaKeyName} + /</span>
<span className="keyboard-shortcut__command">{metaKeyName} + .</span>
<span>{t('KeyboardShortcuts.CodeEditing.CommentLine')}</span>
</li>
<li className="keyboard-shortcut-item">
Expand Down

0 comments on commit cdc5109

Please sign in to comment.