Skip to content

Commit ced7f82

Browse files
committed
internationalise comment shortcut fixes #1167
1 parent cb331c7 commit ced7f82

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
@@ -159,7 +159,8 @@ class Editor extends React.Component {
159159
// choose a color, it deletes characters inline. This is a
160160
// hack to prevent that.
161161
[`${metaKey}-K`]: (cm, event) =>
162-
cm.state.colorpicker.popup_color_picker({ length: 0 })
162+
cm.state.colorpicker.popup_color_picker({ length: 0 }),
163+
[`${metaKey}-.`]: 'toggleComment' // Note: most adblockers use the shortcut ctrl+.
163164
});
164165

165166
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)