File tree 5 files changed +24
-2
lines changed
client/modules/IDE/components
translations/locales/en-US
5 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -211,6 +211,9 @@ const ProjectMenu = () => {
211
211
< NavDropdownMenu id = "sketch" title = { t ( 'Nav.Sketch.Title' ) } >
212
212
< NavMenuItem onClick = { ( ) => dispatch ( newFile ( rootFile . id ) ) } >
213
213
{ t ( 'Nav.Sketch.AddFile' ) }
214
+ < span className = "nav__keyboard-shortcut" >
215
+ { metaKey } +{ '\u21E7' } +A
216
+ </ span >
214
217
</ NavMenuItem >
215
218
< NavMenuItem onClick = { ( ) => dispatch ( newFolder ( rootFile . id ) ) } >
216
219
{ t ( 'Nav.Sketch.AddFolder' ) }
Original file line number Diff line number Diff line change @@ -367,6 +367,11 @@ exports[`Nav renders editor version for desktop 1`] = `
367
367
>
368
368
<button >
369
369
Add File
370
+ <span
371
+ class = " nav__keyboard-shortcut"
372
+ >
373
+ ^+⇧+A
374
+ </span >
370
375
</button >
371
376
</li >
372
377
<li
Original file line number Diff line number Diff line change 8
8
expandSidebar ,
9
9
showErrorModal ,
10
10
startSketch ,
11
- stopSketch
11
+ stopSketch ,
12
+ newFile
12
13
} from '../actions/ide' ;
13
14
import { setAllAccessibleOutput } from '../actions/preferences' ;
14
15
import { cloneProject , saveProject } from '../actions/project' ;
@@ -66,6 +67,7 @@ export const useIDEKeyHandlers = ({ getContent }) => {
66
67
dispatch ( setAllAccessibleOutput ( false ) ) ;
67
68
} ,
68
69
'ctrl-b' : ( e ) => {
70
+ console . log ( 'Ctrl-B Pressed' ) ;
69
71
e . preventDefault ( ) ;
70
72
dispatch (
71
73
// TODO: create actions 'toggleConsole', 'toggleSidebar', etc.
@@ -75,6 +77,11 @@ export const useIDEKeyHandlers = ({ getContent }) => {
75
77
'ctrl-`' : ( e ) => {
76
78
e . preventDefault ( ) ;
77
79
dispatch ( consoleIsExpanded ? collapseConsole ( ) : expandConsole ( ) ) ;
80
+ } ,
81
+ 'ctrl-shift-a' : ( e ) => {
82
+ e . preventDefault ( ) ;
83
+ e . stopPropagation ( ) ;
84
+ dispatch ( newFile ( ) ) ;
78
85
}
79
86
} ) ;
80
87
} ;
Original file line number Diff line number Diff line change @@ -69,6 +69,12 @@ 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" >
74
+ { metaKeyName } + { `\u21E7` } + A
75
+ </ span >
76
+ < span > { t ( 'KeyboardShortcuts.CodeEditing.CreateNewFile' ) } </ span >
77
+ </ li >
72
78
</ ul >
73
79
< h3 className = "keyboard-shortcuts__title" > General</ h3 >
74
80
< ul className = "keyboard-shortcuts__list" >
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