Skip to content

Commit b575bff

Browse files
authored
Merge pull request #2034 from ArztKlein/develop
internationalise comment shortcut fixes #1167
2 parents c864b8a + 1d08fcc commit b575bff

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

client/modules/IDE/components/Editor.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ class Editor extends React.Component {
158158
// choose a color, it deletes characters inline. This is a
159159
// hack to prevent that.
160160
[`${metaKey}-K`]: (cm, event) =>
161-
cm.state.colorpicker.popup_color_picker({ length: 0 })
161+
cm.state.colorpicker.popup_color_picker({ length: 0 }),
162+
[`${metaKey}-.`]: 'toggleComment' // Note: most adblockers use the shortcut ctrl+.
162163
});
163164

164165
this.initializeDocuments(this.props.files);

client/modules/IDE/components/KeyboardShortcutModal.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ function KeyboardShortcutModal() {
6161
<span className="keyboard-shortcut__command">{metaKeyName} + /</span>
6262
<span>{t('KeyboardShortcuts.CodeEditing.CommentLine')}</span>
6363
</li>
64+
<li className="keyboard-shortcut-item">
65+
<span className="keyboard-shortcut__command">{metaKeyName} + .</span>
66+
<span>{t('KeyboardShortcuts.CodeEditing.CommentLine')}</span>
67+
</li>
6468
<li className="keyboard-shortcut-item">
6569
<span className="keyboard-shortcut__command">{metaKeyName} + K</span>
6670
<span>{t('KeyboardShortcuts.CodeEditing.ColorPicker')}</span>

0 commit comments

Comments
 (0)