mirror of
https://github.com/google/blockly.git
synced 2026-01-11 02:47:09 +01:00
Add Ctrl-y (redo) support.
Does not trigger on Command-y since this is a Windows-only shortcut.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user