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",
|
||||
shortcut: "mod+y",
|
||||
},
|
||||
{
|
||||
display_name: "Redo (alternative)",
|
||||
name: "Redo Alt",
|
||||
shortcut: "mod+shift+z",
|
||||
},
|
||||
{
|
||||
display_name: "Group",
|
||||
name: "Group",
|
||||
|
|
|
|||
|
|
@ -290,6 +290,7 @@ export default function Page({ view }: { view?: boolean }): JSX.Element {
|
|||
|
||||
const undoAction = useShortcutsStore((state) => state.undo);
|
||||
const redoAction = useShortcutsStore((state) => state.redo);
|
||||
const redoAltAction = useShortcutsStore((state) => state.redoAlt);
|
||||
const copyAction = useShortcutsStore((state) => state.copy);
|
||||
const duplicate = useShortcutsStore((state) => state.duplicate);
|
||||
const deleteAction = useShortcutsStore((state) => state.delete);
|
||||
|
|
@ -301,6 +302,8 @@ export default function Page({ view }: { view?: boolean }): JSX.Element {
|
|||
//@ts-ignore
|
||||
useHotkeys(redoAction, handleRedo);
|
||||
//@ts-ignore
|
||||
useHotkeys(redoAltAction, handleRedo);
|
||||
//@ts-ignore
|
||||
useHotkeys(groupAction, handleGroup);
|
||||
//@ts-ignore
|
||||
useHotkeys(duplicate, handleDuplicate);
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ export const useShortcutsStore = create<shortcutsStoreType>((set, get) => ({
|
|||
flow: "mod+shift+b",
|
||||
undo: "mod+z",
|
||||
redo: "mod+y",
|
||||
redoAlt: "mod+shift+z",
|
||||
openPlayground: "mod+k",
|
||||
advancedSettings: "mod+shift+a",
|
||||
minimize: "mod+.",
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ export type shortcutsStoreType = {
|
|||
openPlayground: string;
|
||||
undo: string;
|
||||
redo: string;
|
||||
redoAlt: string;
|
||||
advancedSettings: string;
|
||||
minimize: string;
|
||||
code: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue