From b60f5fcf063631d00337911fd3e9b39c0cd64bfc Mon Sep 17 00:00:00 2001 From: Kostas Bariotis Date: Mon, 6 Apr 2020 23:24:50 +0100 Subject: [PATCH] Save on CTRL/CMD + S (#1287) * save on shortcut * revert keys files * remove constant --- src/actions/actionExport.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/actions/actionExport.tsx b/src/actions/actionExport.tsx index f01df05f..bfe57d64 100644 --- a/src/actions/actionExport.tsx +++ b/src/actions/actionExport.tsx @@ -6,6 +6,7 @@ import { ToolButton } from "../components/ToolButton"; import { t } from "../i18n"; import useIsMobile from "../is-mobile"; import { register } from "./register"; +import { KEYS } from "../keys"; export const actionChangeProjectName = register({ name: "changeProjectName", @@ -47,6 +48,9 @@ export const actionSaveScene = register({ saveAsJSON(elements, appState).catch((error) => console.error(error)); return { commitToHistory: false }; }, + keyTest: (event) => { + return event.key === "s" && event[KEYS.CTRL_OR_CMD]; + }, PanelComponent: ({ updateData }) => (