Ticket #45365: 45365.diff
File 45365.diff, 1.9 KB (added by , 2 years ago) |
---|
-
src/wp-includes/class-wp-editor.php
1268 1268 1269 1269 // Shortcuts help modal 1270 1270 'Keyboard Shortcuts' => array( __( 'Keyboard Shortcuts' ), 'accessH' ), 1271 'Classic Block Keyboard Shortcuts' => __( 'Classic Block Keyboard Shortcuts' ), 1271 1272 'Default shortcuts,' => __( 'Default shortcuts,' ), 1272 1273 'Additional shortcuts,' => __( 'Additional shortcuts,' ), 1273 1274 'Focus shortcuts:' => __( 'Focus shortcuts:' ), -
src/wp-includes/js/tinymce/plugins/wordpress/plugin.js
370 370 html += '</div>'; 371 371 372 372 dialog = editor.windowManager.open( { 373 title: 'Keyboard Shortcuts',373 title: editor.settings.classic_block_editor ? 'Classic Block Keyboard Shortcuts' : 'Keyboard Shortcuts', 374 374 items: { 375 375 type: 'container', 376 376 classes: 'wp-help', … … 655 655 z: 'WP_Adv', 656 656 t: 'WP_More', 657 657 d: 'Strikethrough', 658 h: 'WP_Help',659 658 p: 'WP_Page', 660 659 x: 'WP_Code' 661 660 }, function( command, key ) { … … 668 667 } 669 668 } ); 670 669 670 // Workaround for not triggering the global help modal in the Block Editor by the Classic Block shortcut. 671 editor.on( 'keydown', function( event ) { 672 if ( event.shiftKey && event.altKey && event.code === 'KeyH' ) { 673 editor.execCommand( 'WP_Help' ); 674 event.stopPropagation(); 675 event.stopImmediatePropagation(); 676 return false; 677 } 678 679 return true; 680 }); 681 671 682 if ( window.getUserSetting( 'editor_plain_text_paste_warning' ) > 1 ) { 672 683 editor.settings.paste_plaintext_inform = false; 673 684 }