Skip to content

Commit

Permalink
Keyboard Shortcut: Clean up shortcut names
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed Jun 21, 2023
1 parent a5dd662 commit ecd5af1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function KeyboardShortcutsRegister() {
} );

registerShortcut( {
name: `core/customize-widgets/transform-heading-to-paragraph`,
name: 'core/customize-widgets/transform-heading-to-paragraph',
category: 'block-library',
description: __( 'Transform heading to paragraph.' ),
keyCombination: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function KeyboardShortcuts() {
} );

registerShortcut( {
name: `core/edit-post/transform-heading-to-paragraph`,
name: 'core/edit-post/transform-heading-to-paragraph',
category: 'block-library',
description: __( 'Transform heading to paragraph.' ),
keyCombination: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function KeyboardShortcutsRegister() {
} );

registerShortcut( {
name: `core/edit-site/transform-heading-to-paragraph`,
name: 'core/edit-site/transform-heading-to-paragraph',
category: 'block-library',
description: __( 'Transform heading to paragraph.' ),
keyCombination: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function KeyboardShortcuts() {
} );

useShortcut(
'core/edit-widgets//transform-heading-to-paragraph',
'core/edit-widgets/transform-heading-to-paragraph',
( event ) => handleTextLevelShortcut( event, 0 )
);

Expand All @@ -79,7 +79,7 @@ function KeyboardShortcuts() {
//the hook will execute the same way every time
//eslint-disable-next-line react-hooks/rules-of-hooks
useShortcut(
`core/edit-widgets//transform-paragraph-to-heading-${ level }`,
`core/edit-widgets/transform-paragraph-to-heading-${ level }`,
( event ) => handleTextLevelShortcut( event, level )
);
} );
Expand Down Expand Up @@ -180,7 +180,7 @@ function KeyboardShortcutsRegister() {
} );

registerShortcut( {
name: `core/edit-widgets//transform-heading-to-paragraph`,
name: 'core/edit-widgets/transform-heading-to-paragraph',
category: 'block-library',
description: __( 'Transform heading to paragraph.' ),
keyCombination: {
Expand All @@ -191,7 +191,7 @@ function KeyboardShortcutsRegister() {

[ 1, 2, 3, 4, 5, 6 ].forEach( ( level ) => {
registerShortcut( {
name: `core/edit-widgets//transform-paragraph-to-heading-${ level }`,
name: `core/edit-widgets/transform-paragraph-to-heading-${ level }`,
category: 'block-library',
description: __( 'Transform paragraph to heading.' ),
keyCombination: {
Expand Down

0 comments on commit ecd5af1

Please sign in to comment.