File tree Expand file tree Collapse file tree 5 files changed +24
-2
lines changed
client/modules/IDE/components
translations/locales/en-US Expand file tree Collapse file tree 5 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -211,6 +211,9 @@ const ProjectMenu = () => {
211211 < NavDropdownMenu id = "sketch" title = { t ( 'Nav.Sketch.Title' ) } >
212212 < NavMenuItem onClick = { ( ) => dispatch ( newFile ( rootFile . id ) ) } >
213213 { t ( 'Nav.Sketch.AddFile' ) }
214+ < span className = "nav__keyboard-shortcut" >
215+ { metaKey } +{ '\u21E7' } +A
216+ </ span >
214217 </ NavMenuItem >
215218 < NavMenuItem onClick = { ( ) => dispatch ( newFolder ( rootFile . id ) ) } >
216219 { 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`] = `
367367 >
368368 <button >
369369 Add File
370+ <span
371+ class = " nav__keyboard-shortcut"
372+ >
373+ ^+⇧+A
374+ </span >
370375 </button >
371376 </li >
372377 <li
Original file line number Diff line number Diff line change 88 expandSidebar ,
99 showErrorModal ,
1010 startSketch ,
11- stopSketch
11+ stopSketch ,
12+ newFile
1213} from '../actions/ide' ;
1314import { setAllAccessibleOutput } from '../actions/preferences' ;
1415import { cloneProject , saveProject } from '../actions/project' ;
@@ -66,6 +67,7 @@ export const useIDEKeyHandlers = ({ getContent }) => {
6667 dispatch ( setAllAccessibleOutput ( false ) ) ;
6768 } ,
6869 'ctrl-b' : ( e ) => {
70+ console . log ( 'Ctrl-B Pressed' ) ;
6971 e . preventDefault ( ) ;
7072 dispatch (
7173 // TODO: create actions 'toggleConsole', 'toggleSidebar', etc.
@@ -75,6 +77,11 @@ export const useIDEKeyHandlers = ({ getContent }) => {
7577 'ctrl-`' : ( e ) => {
7678 e . preventDefault ( ) ;
7779 dispatch ( consoleIsExpanded ? collapseConsole ( ) : expandConsole ( ) ) ;
80+ } ,
81+ 'ctrl-shift-a' : ( e ) => {
82+ e . preventDefault ( ) ;
83+ e . stopPropagation ( ) ;
84+ dispatch ( newFile ( ) ) ;
7885 }
7986 } ) ;
8087} ;
Original file line number Diff line number Diff line change @@ -69,6 +69,12 @@ function KeyboardShortcutModal() {
6969 < span className = "keyboard-shortcut__command" > { metaKeyName } + K</ span >
7070 < span > { t ( 'KeyboardShortcuts.CodeEditing.ColorPicker' ) } </ span >
7171 </ 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 >
7278 </ ul >
7379 < h3 className = "keyboard-shortcuts__title" > General</ h3 >
7480 < ul className = "keyboard-shortcuts__list" >
Original file line number Diff line number Diff line change 192192 "FindNextTextMatch" : " Find Next Text Match" ,
193193 "FindPreviousTextMatch" : " Find Previous Text Match" ,
194194 "CodeEditing" : " Code Editing" ,
195- "ColorPicker" : " Show Inline Color Picker"
195+ "ColorPicker" : " Show Inline Color Picker" ,
196+ "CreateNewFile" : " Create New File"
196197 },
197198 "General" : {
198199 "StartSketch" : " Start Sketch" ,
You can’t perform that action at this time.
0 commit comments