Skip to content

Commit

Permalink
Change shortcut for remove block to primary shift x
Browse files Browse the repository at this point in the history
  • Loading branch information
talldan committed Aug 27, 2018
1 parent 9ca772d commit 1e6f3f7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const blockShortcuts = {
description: __( 'Duplicate the selected block(s).' ),
},
{
keyCombination: ctrlShift( '-' ),
keyCombination: primaryShift( 'x' ),
description: __( 'Remove the selected block(s).' ),
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ exports[`KeyboardShortcutHelpModal should match snapshot when the modal is activ
"+",
"Shift",
"+",
"-",
"X",
],
},
Object {
Expand Down
4 changes: 0 additions & 4 deletions packages/components/src/keyboard-shortcuts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ class KeyboardShortcuts extends Component {
super( ...arguments );

this.bindKeyTarget = this.bindKeyTarget.bind( this );

// Firefox uses keycode 173 for '-', while other browsers use 189.
// This line makes binding to the '-' key work consistently.
Mousetrap.addKeycodes( { 173: '-' } );
}

componentDidMount() {
Expand Down
4 changes: 2 additions & 2 deletions packages/editor/src/components/block-settings-menu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ const shortcuts = {
display: displayShortcut.primaryShift( 'd' ),
},
removeBlock: {
raw: rawShortcut.ctrlShift( '-' ),
display: displayShortcut.ctrlShift( '-' ),
raw: rawShortcut.primaryShift( 'x' ),
display: displayShortcut.primaryShift( 'x' ),
},
insertBefore: {
raw: rawShortcut.primaryAlt( 't' ),
Expand Down

0 comments on commit 1e6f3f7

Please sign in to comment.