提交 8466a3e9 编写于 作者: T Tyler Lindberg

Listen for Command-Z instead of Ctrl-Z on Mac

上级 144305c6
......@@ -311,11 +311,14 @@
case 90: // Register Ctrl-Z for Undo, Ctrl-Shift-Z for Redo
if ( event.ctrlKey && event.shiftKey ) {
var isMac = navigator.platform.toUpperCase().indexOf( 'MAC' ) >= 0;
var modifierKey = isMac ? event.metaKey : event.ctrlKey;
if ( modifierKey && event.shiftKey ) {
editor.redo();
} else if ( event.ctrlKey ) {
} else if ( modifierKey ) {
editor.undo();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册