Virtual whiteboard for sketching hand-drawn like diagrams
change copy/paste styles shortcuts (#1881)
David Luzardf5eb3f0d971
diff --git a/src/actions/actionStyles.ts b/src/actions/actionStyles.tsindex 2e1e72eed8..2cd6936c0f 100644--- a/src/actions/actionStyles.ts+++ b/src/actions/actionStyles.ts@@ -27,7 +27,9 @@ export const actionCopyStyles = register({},contextItemLabel: "labels.copyStyles",keyTest: (event) =>- event[KEYS.CTRL_OR_CMD] && event.shiftKey && event.key === "C",+ event[KEYS.CTRL_OR_CMD] &&+ event.altKey &&+ event.keyCode === KEYS.C_KEY_CODE,contextMenuOrder: 0,});@@ -67,6 +69,8 @@ export const actionPasteStyles = register({},contextItemLabel: "labels.pasteStyles",keyTest: (event) =>- event[KEYS.CTRL_OR_CMD] && event.shiftKey && event.key === "V",+ event[KEYS.CTRL_OR_CMD] &&+ event.altKey &&+ event.keyCode === KEYS.V_KEY_CODE,contextMenuOrder: 1,});diff --git a/src/components/ShortcutsDialog.tsx b/src/components/ShortcutsDialog.tsxindex 4f12ce79a7..2f90eddc7a 100644--- a/src/components/ShortcutsDialog.tsx+++ b/src/components/ShortcutsDialog.tsx@@ -287,11 +287,11 @@ export const ShortcutsDialog = ({ onClose }: { onClose?: () => void }) => {/><Shortcutlabel={t("labels.copyStyles")}- shortcuts={[getShortcutKey("CtrlOrCmd+Shift+C")]}+ shortcuts={[getShortcutKey("CtrlOrCmd+Alt+C")]}/><Shortcutlabel={t("labels.pasteStyles")}- shortcuts={[getShortcutKey("CtrlOrCmd+Shift+V")]}+ shortcuts={[getShortcutKey("CtrlOrCmd+Alt+V")]}/><Shortcutlabel={t("labels.delete")}diff --git a/src/keys.ts b/src/keys.tsindex 10e82bcb23..07cce39e25 100644--- a/src/keys.ts+++ b/src/keys.ts@@ -18,6 +18,8 @@ export const KEYS = {Z_KEY_CODE: 90,GRID_KEY_CODE: 222,G_KEY_CODE: 71,+ C_KEY_CODE: 67,+ V_KEY_CODE: 86,} as const;export type Key = keyof typeof KEYS;