feat: add ctrl+shift+z alternative shortcut for redoing actions (#5536)
* Added alternative for redo * Added redo alternative on hotkeys * added redo alternative type --------- Co-authored-by: anovazzi1 <otavio2204@gmail.com>
This commit is contained in:
parent
6b0435906f
commit
723a31051e
4 changed files with 10 additions and 0 deletions
|
|
@ -831,6 +831,11 @@ export const defaultShortcuts = [
|
||||||
name: "Redo",
|
name: "Redo",
|
||||||
shortcut: "mod+y",
|
shortcut: "mod+y",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
display_name: "Redo (alternative)",
|
||||||
|
name: "Redo Alt",
|
||||||
|
shortcut: "mod+shift+z",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
display_name: "Group",
|
display_name: "Group",
|
||||||
name: "Group",
|
name: "Group",
|
||||||
|
|
|
||||||
|
|
@ -290,6 +290,7 @@ export default function Page({ view }: { view?: boolean }): JSX.Element {
|
||||||
|
|
||||||
const undoAction = useShortcutsStore((state) => state.undo);
|
const undoAction = useShortcutsStore((state) => state.undo);
|
||||||
const redoAction = useShortcutsStore((state) => state.redo);
|
const redoAction = useShortcutsStore((state) => state.redo);
|
||||||
|
const redoAltAction = useShortcutsStore((state) => state.redoAlt);
|
||||||
const copyAction = useShortcutsStore((state) => state.copy);
|
const copyAction = useShortcutsStore((state) => state.copy);
|
||||||
const duplicate = useShortcutsStore((state) => state.duplicate);
|
const duplicate = useShortcutsStore((state) => state.duplicate);
|
||||||
const deleteAction = useShortcutsStore((state) => state.delete);
|
const deleteAction = useShortcutsStore((state) => state.delete);
|
||||||
|
|
@ -301,6 +302,8 @@ export default function Page({ view }: { view?: boolean }): JSX.Element {
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
useHotkeys(redoAction, handleRedo);
|
useHotkeys(redoAction, handleRedo);
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
|
useHotkeys(redoAltAction, handleRedo);
|
||||||
|
//@ts-ignore
|
||||||
useHotkeys(groupAction, handleGroup);
|
useHotkeys(groupAction, handleGroup);
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
useHotkeys(duplicate, handleDuplicate);
|
useHotkeys(duplicate, handleDuplicate);
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ export const useShortcutsStore = create<shortcutsStoreType>((set, get) => ({
|
||||||
flow: "mod+shift+b",
|
flow: "mod+shift+b",
|
||||||
undo: "mod+z",
|
undo: "mod+z",
|
||||||
redo: "mod+y",
|
redo: "mod+y",
|
||||||
|
redoAlt: "mod+shift+z",
|
||||||
openPlayground: "mod+k",
|
openPlayground: "mod+k",
|
||||||
advancedSettings: "mod+shift+a",
|
advancedSettings: "mod+shift+a",
|
||||||
minimize: "mod+.",
|
minimize: "mod+.",
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ export type shortcutsStoreType = {
|
||||||
openPlayground: string;
|
openPlayground: string;
|
||||||
undo: string;
|
undo: string;
|
||||||
redo: string;
|
redo: string;
|
||||||
|
redoAlt: string;
|
||||||
advancedSettings: string;
|
advancedSettings: string;
|
||||||
minimize: string;
|
minimize: string;
|
||||||
code: string;
|
code: string;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue