diff --git a/client/common/useKeyDownHandlers.js b/client/common/useKeyDownHandlers.js
index d2e90d7997..dbe2ee06bb 100644
--- a/client/common/useKeyDownHandlers.js
+++ b/client/common/useKeyDownHandlers.js
@@ -38,6 +38,9 @@ export default function useKeyDownHandlers(keyHandlers) {
/^\d+$/.test(e.code.at(-1)) ? e.code.at(-1) : e.key.toLowerCase()
}`
]?.(e);
+ } else if (isCtrl && e.altKey && e.code === 'KeyN') {
+ // specifically for creating a new file
+ handlers.current[`ctrl-alt-n`]?.(e);
} else if (isCtrl) {
handlers.current[`ctrl-${e.key.toLowerCase()}`]?.(e);
}
diff --git a/client/modules/IDE/components/Header/Nav.jsx b/client/modules/IDE/components/Header/Nav.jsx
index 5bfdc1162e..3492c4388a 100644
--- a/client/modules/IDE/components/Header/Nav.jsx
+++ b/client/modules/IDE/components/Header/Nav.jsx
@@ -133,6 +133,8 @@ const ProjectMenu = () => {
const replaceCommand =
metaKey === 'Ctrl' ? `${metaKeyName}+H` : `${metaKeyName}+⌥+F`;
+ const newFileCommand =
+ metaKey === 'Ctrl' ? `${metaKeyName}+Alt+N` : `${metaKeyName}+⌥+N`;
return (
@@ -220,6 +222,7 @@ const ProjectMenu = () => {
dispatch(newFile(rootFile.id))}>
{t('Nav.Sketch.AddFile')}
+ {newFileCommand}
dispatch(newFolder(rootFile.id))}>
{t('Nav.Sketch.AddFolder')}
diff --git a/client/modules/IDE/components/Header/__snapshots__/Nav.unit.test.jsx.snap b/client/modules/IDE/components/Header/__snapshots__/Nav.unit.test.jsx.snap
index f26ba088fb..af56a1a418 100644
--- a/client/modules/IDE/components/Header/__snapshots__/Nav.unit.test.jsx.snap
+++ b/client/modules/IDE/components/Header/__snapshots__/Nav.unit.test.jsx.snap
@@ -637,6 +637,11 @@ exports[`Nav renders editor version for desktop 1`] = `
role="menuitem"
>
Add File
+
+ Ctrl+Alt+N
+
- {
sidebarIsExpanded ? collapseSidebar() : expandSidebar()
);
},
+ 'ctrl-alt-n': (e) => {
+ e.preventDefault();
+ e.stopPropagation();
+ dispatch(newFile());
+ },
'ctrl-`': (e) => {
e.preventDefault();
dispatch(consoleIsExpanded ? collapseConsole() : expandConsole());
diff --git a/client/modules/IDE/components/KeyboardShortcutModal.jsx b/client/modules/IDE/components/KeyboardShortcutModal.jsx
index a56710810d..fbca28a572 100644
--- a/client/modules/IDE/components/KeyboardShortcutModal.jsx
+++ b/client/modules/IDE/components/KeyboardShortcutModal.jsx
@@ -6,6 +6,8 @@ function KeyboardShortcutModal() {
const { t } = useTranslation();
const replaceCommand =
metaKey === 'Ctrl' ? `${metaKeyName} + H` : `${metaKeyName} + ⌥ + F`;
+ const newFileCommand =
+ metaKey === 'Ctrl' ? `${metaKeyName} + Alt + N` : `${metaKeyName} + ⌥ + N`;
return (
@@ -69,6 +71,10 @@ function KeyboardShortcutModal() {
{metaKeyName} + K
{t('KeyboardShortcuts.CodeEditing.ColorPicker')}
+
-
+ {newFileCommand}
+ {t('KeyboardShortcuts.CodeEditing.CreateNewFile')}
+
General
diff --git a/translations/locales/en-US/translations.json b/translations/locales/en-US/translations.json
index 2f00b3bd16..31a42c47af 100644
--- a/translations/locales/en-US/translations.json
+++ b/translations/locales/en-US/translations.json
@@ -207,7 +207,8 @@
"FindNextTextMatch": "Find Next Text Match",
"FindPreviousTextMatch": "Find Previous Text Match",
"CodeEditing": "Code Editing",
- "ColorPicker": "Show Inline Color Picker"
+ "ColorPicker": "Show Inline Color Picker",
+ "CreateNewFile": "Create New File"
},
"General": {
"StartSketch": "Start Sketch",