File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
client/modules/IDE/components Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -63,11 +63,6 @@ window.JSHINT = JSHINT;
63
63
window . CSSLint = CSSLint ;
64
64
window . HTMLHint = HTMLHint ;
65
65
66
-
67
- // delete CodeMirror.keyMap.sublime['Shift-Cmd-F'];
68
-
69
- console . log ( CodeMirror . keyMap . sublime ) ;
70
-
71
66
const IS_TAB_INDENT = false ;
72
67
const INDENTATION_AMOUNT = 2 ;
73
68
@@ -173,7 +168,8 @@ class Editor extends React.Component {
173
168
// 91 === Cmd
174
169
// 16 === Shift
175
170
// 70 === f
176
- if ( this . map [ 91 ] && this . map [ 16 ] && this . map [ 70 ] ) {
171
+ // 17 === Ctrl
172
+ if ( ( ( metaKey === 'Cmd' && this . map [ 91 ] ) || ( metaKey === 'Ctrl' && this . map [ 17 ] ) ) && this . map [ 16 ] && this . map [ 70 ] ) {
177
173
e . preventDefault ( ) ; // prevent browser's default behaviour
178
174
this . tidyCode ( ) ;
179
175
}
@@ -339,7 +335,7 @@ class Editor extends React.Component {
339
335
}
340
336
}
341
337
342
- handleKey ( map , e ) { // update the state of each key pressed and released
338
+ handleKey ( map , e ) { // update the 'keydown ' state of each key
343
339
map [ e . keyCode ] = e . type === 'keydown' ;
344
340
}
345
341
You can’t perform that action at this time.
0 commit comments