]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/js/editor-expand.js
Wordpress 4.5.3-scripts
[autoinstalls/wordpress.git] / wp-admin / js / editor-expand.js
index 3a744fe505925a2ce262dcfb70557a7f45541518..ba5b095203aefa014c8bdc67fcba40f309947e71 100644 (file)
                }
 
                function fadeOut( event ) {
-                       var key = event && event.keyCode;
+                       var isMac,
+                               key = event && event.keyCode;
 
-                       // fadeIn and return on Escape and keyboard shortcut Alt+Shift+W.
-                       if ( key === 27 || ( key === 87 && event.altKey && event.shiftKey ) ) {
+                       if ( window.navigator.platform ) {
+                               isMac = ( window.navigator.platform.indexOf( 'Mac' ) > -1 );
+                       }
+
+                       // fadeIn and return on Escape and keyboard shortcut Alt+Shift+W and Ctrl+Opt+W.
+                       if ( key === 27 || ( key === 87 && event.altKey && ( ( ! isMac && event.shiftKey ) || ( isMac && event.ctrlKey ) ) ) ) {
                                fadeIn( event );
                                return;
                        }
                        } );
 
                        editor.addCommand( 'wpToggleDFW', toggle );
-                       editor.addShortcut( 'alt+shift+w', '', 'wpToggleDFW' );
+                       editor.addShortcut( 'access+w', '', 'wpToggleDFW' );
                } );
 
                $document.on( 'tinymce-editor-init.focus', function( event, editor ) {