From 32b1f9273995063c10a9737259fa36794eaee8d2 Mon Sep 17 00:00:00 2001 From: Daniel Richards Date: Tue, 28 Aug 2018 13:02:08 +0800 Subject: [PATCH] Change keyboard shortcut for remove block to Cmd+Shift+X / Ctrl+Shift+X (#9190) * Change shortcut for remove block to primary shift x * Update keyboard shortcut help modal * Update keyboard shortcuts in faq docs --- docs/reference/faq.md | 2 +- edit-post/components/keyboard-shortcut-help-modal/config.js | 2 +- .../test/__snapshots__/index.js.snap | 4 ++-- packages/editor/src/components/block-settings-menu/index.js | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/reference/faq.md b/docs/reference/faq.md index d5162a405be16e..5457ba3b3eeecb 100644 --- a/docs/reference/faq.md +++ b/docs/reference/faq.md @@ -70,7 +70,7 @@ This is the canonical list of keyboard shortcuts: ### Block shortcuts * Shift+⌘D Duplicate the selected block(s). -* Option+⌘Backspace Remove the selected block(s). +* Shift+⌘X Remove the selected block(s). * Option+⌘T Insert a new block before the selected block(s). * Option+⌘Y Insert a new block after the selected block(s). * / Change the block type after adding a new paragraph. diff --git a/edit-post/components/keyboard-shortcut-help-modal/config.js b/edit-post/components/keyboard-shortcut-help-modal/config.js index f77f229c1798f3..f21beec797668d 100644 --- a/edit-post/components/keyboard-shortcut-help-modal/config.js +++ b/edit-post/components/keyboard-shortcut-help-modal/config.js @@ -88,7 +88,7 @@ const blockShortcuts = { description: __( 'Duplicate the selected block(s).' ), }, { - keyCombination: primaryAlt( 'backspace' ), + keyCombination: primaryShift( 'x' ), description: __( 'Remove the selected block(s).' ), }, { diff --git a/edit-post/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap b/edit-post/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap index c1ccc4ca67a059..2b9d46336f049d 100644 --- a/edit-post/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap +++ b/edit-post/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap @@ -165,9 +165,9 @@ exports[`KeyboardShortcutHelpModal should match snapshot when the modal is activ "keyCombination": Array [ "Ctrl", "+", - "Alt", + "Shift", "+", - "Backspace", + "X", ], }, Object { diff --git a/packages/editor/src/components/block-settings-menu/index.js b/packages/editor/src/components/block-settings-menu/index.js index 43aa323d067ec0..dc9478a8341a73 100644 --- a/packages/editor/src/components/block-settings-menu/index.js +++ b/packages/editor/src/components/block-settings-menu/index.js @@ -37,8 +37,8 @@ const shortcuts = { display: displayShortcut.primaryShift( 'd' ), }, removeBlock: { - raw: rawShortcut.primaryAlt( 'backspace' ), - display: displayShortcut.primaryAlt( 'bksp' ), + raw: rawShortcut.primaryShift( 'x' ), + display: displayShortcut.primaryShift( 'x' ), }, insertBefore: { raw: rawShortcut.primaryAlt( 't' ),