mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
Save on CTRL/CMD + S (#1287)
* save on shortcut * revert keys files * remove constant
This commit is contained in:
parent
729aeacc47
commit
b60f5fcf06
1 changed files with 4 additions and 0 deletions
|
@ -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 }) => (
|
||||
<ToolButton
|
||||
type="button"
|
||||
|
|
Loading…
Add table
Reference in a new issue