Skip to content

Commit

Permalink
Merge pull request #2034 from ArztKlein/develop
Browse files Browse the repository at this point in the history
internationalise comment shortcut fixes #1167
  • Loading branch information
raclim committed Apr 19, 2023
2 parents c864b8a + 1d08fcc commit b575bff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/modules/IDE/components/Editor.jsx
Expand Up @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions client/modules/IDE/components/KeyboardShortcutModal.jsx
Expand Up @@ -61,6 +61,10 @@ function KeyboardShortcutModal() {
<span className="keyboard-shortcut__command">{metaKeyName} + /</span>
<span>{t('KeyboardShortcuts.CodeEditing.CommentLine')}</span>
</li>
<li className="keyboard-shortcut-item">
<span className="keyboard-shortcut__command">{metaKeyName} + .</span>
<span>{t('KeyboardShortcuts.CodeEditing.CommentLine')}</span>
</li>
<li className="keyboard-shortcut-item">
<span className="keyboard-shortcut__command">{metaKeyName} + K</span>
<span>{t('KeyboardShortcuts.CodeEditing.ColorPicker')}</span>
Expand Down

0 comments on commit b575bff

Please sign in to comment.