Skip to content

Commit afec089

Browse files
committed
use metaKey to check for Windows/MacOs
1 parent 059b171 commit afec089

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

client/modules/IDE/components/Editor.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,12 @@ class Editor extends React.Component {
168168

169169
this._cm.on('keydown', (_cm, e) => {
170170
// 70 === f
171-
if ((e.metaKey || e.ctrlKey) && e.shiftKey && e.keyCode === 70) {
171+
if (
172+
((metaKey === 'Cmd' && e.metaKey) ||
173+
(metaKey === 'Ctrl' && e.ctrlKey)) &&
174+
e.shiftKey &&
175+
e.keyCode === 70
176+
) {
172177
e.preventDefault();
173178
this.tidyCode();
174179
}

0 commit comments

Comments
 (0)