Skip to content

Commit

Permalink
Add Ctrl-y (redo) support.
Browse files Browse the repository at this point in the history
Does not trigger on Command-y since this is a Windows-only shortcut.
  • Loading branch information
NeilFraser committed Apr 30, 2020
1 parent 84cd83e commit f4fc455
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/blockly.js
Expand Up @@ -249,6 +249,10 @@ Blockly.onKeyDown = function(e) {
// 'z' for undo 'Z' is for redo.
Blockly.hideChaff();
mainWorkspace.undo(e.shiftKey);
} else if (e.ctrlKey && e.keyCode == Blockly.utils.KeyCodes.Y) {
// Ctrl-y is redo in Windows. Command-y is never valid on Macs.
Blockly.hideChaff();
mainWorkspace.undo(true);
}
}
// Common code for delete and cut.
Expand Down

0 comments on commit f4fc455

Please sign in to comment.