File tree 5 files changed +20
-1
lines changed
translations/locales/en-US
5 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -197,6 +197,7 @@ class Nav extends React.PureComponent {
197
197
onClick = { ( ) => this . props . newFile ( this . props . rootFile . id ) }
198
198
>
199
199
{ this . props . t ( 'Nav.Sketch.AddFile' ) }
200
+ < span className = "nav__keyboard-shortcut" > { '\u21E7' } +N</ span >
200
201
</ NavMenuItem >
201
202
< NavMenuItem
202
203
onClick = { ( ) => this . props . newFolder ( this . props . rootFile . id ) }
Original file line number Diff line number Diff line change @@ -373,6 +373,11 @@ exports[`Nav renders editor version 1`] = `
373
373
>
374
374
<button >
375
375
Add File
376
+ <span
377
+ class = " nav__keyboard-shortcut"
378
+ >
379
+ ⇧+N
380
+ </span >
376
381
</button >
377
382
</li >
378
383
<li
Original file line number Diff line number Diff line change @@ -69,6 +69,10 @@ function KeyboardShortcutModal() {
69
69
< span className = "keyboard-shortcut__command" > { metaKeyName } + K</ span >
70
70
< span > { t ( 'KeyboardShortcuts.CodeEditing.ColorPicker' ) } </ span >
71
71
</ li >
72
+ < li className = "keyboard-shortcut-item" >
73
+ < span className = "keyboard-shortcut__command" > { '\u21E7' } + N</ span >
74
+ < span > { t ( 'KeyboardShortcuts.CodeEditing.CreateNewFile' ) } </ span >
75
+ </ li >
72
76
</ ul >
73
77
< h3 className = "keyboard-shortcuts__title" > General</ h3 >
74
78
< ul className = "keyboard-shortcuts__list" >
Original file line number Diff line number Diff line change @@ -229,6 +229,14 @@ class IDEView extends React.Component {
229
229
this . props . closeNewFileModal ( ) ;
230
230
}
231
231
}
232
+ if ( e . keyCode === 78 && e . shiftKey ) {
233
+ e . preventDefault ( ) ;
234
+ e . stopPropagation ( ) ;
235
+ this . props . newFile (
236
+ this . props . files . filter ( ( file ) => file . name === 'root' ) [ 0 ] . id
237
+ ) ;
238
+ // 78 === n
239
+ }
232
240
}
233
241
234
242
handleUnsavedChanges = ( nextLocation ) =>
Original file line number Diff line number Diff line change 192
192
"FindNextTextMatch" : " Find Next Text Match" ,
193
193
"FindPreviousTextMatch" : " Find Previous Text Match" ,
194
194
"CodeEditing" : " Code Editing" ,
195
- "ColorPicker" : " Show Inline Color Picker"
195
+ "ColorPicker" : " Show Inline Color Picker" ,
196
+ "CreateNewFile" : " Create New File"
196
197
},
197
198
"General" : {
198
199
"StartSketch" : " Start Sketch" ,
You can’t perform that action at this time.
0 commit comments