question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to set CMD+SHIFT+Z as redo shortcut

See original GitHub issue

Description

I always use cmd+z for undo and cmd+shift+z for redo in every application I use so I wanted to set the same shortcuts for this library. However if I set it up like that then both cmd+z and cmd+shift+z will perform an undo action.

My configuration:

const undo = new Undo({
  editor,
  config: {
    shortcuts: {
      undo: "CMD+Z",
      redo: "CMD+SHIFT+Z",
    },
  },
});

Environment

  • Editor.js version: 2.23.2
  • Plugins you use with their versions: editorjs-undo: 2.0.0-rc.3
  • Device, Browser, OS: Apple M1 Pro, Chrome Version 100.0.4896.60 (Official Build) (arm64), MacOS Monterey Version 12.2.1

Current behavior

Having both cmd+z as undo and cmd+shift+z as redo in the shortcuts config will result in both performing an undo action.

Expected behavior

The shortcuts should respect the config sent into Undo.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
MarioRodriguezScommented, Apr 29, 2022

@christoph-kluge @hlynurstef Hi there!

The v2.0 has just been released. Thanks!

1reaction
MarioRodriguezScommented, Apr 18, 2022

@hlynurstef @christoph-kluge Hi there! Thanks a lot for reporting the issue, it was solved in #109 and the solution will be available in the version v2.0 soon.

Best, Mario.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Redo" shortcut Ctrl+Y vs Ctrl+Shift+Z - Microsoft Community
A shortcut key of a "redo" action is now Ctrl+Y in all Microsoft Office products. However, a lot of other programs like Matlab, ......
Read more >
On a mac, setup CMD - Shift - z to be 'undo-tree-redo'
Try (global-set-key (kbd "s-Z") 'undo-tree-redo) . ( Z = SHIFT + z ). This works for me on Linux with s- being the...
Read more >
MAC - undo and redo - Graphisoft Community
i am using archicad 8.1 and have just set the keyboard shortcuts to undo using 'Cmd-Shift-Z'. no problem. it works just fine. i...
Read more >
Why can't I reasign the "Undo" function as ctrl+y instead of ctrl ...
I've tried replacing the "redo" command from ctrl+shift+z to ctrl+y, but no matter what it will always do a "paste yank text" when...
Read more >
Revision History, Undo and Redo - Elementor
Undo / Redo Keyboard Shortcuts ... You can also use CTRL-Z (Windows) or CMD-Z (Mac) to undo your last action and CTRL-SHIFT-Z or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found