diff --git a/packages/block-editor/src/components/block-settings-menu/block-settings-dropdown.js b/packages/block-editor/src/components/block-settings-menu/block-settings-dropdown.js index 9e26943e22ea7c..1e3ab726475215 100644 --- a/packages/block-editor/src/components/block-settings-menu/block-settings-dropdown.js +++ b/packages/block-editor/src/components/block-settings-menu/block-settings-dropdown.js @@ -11,7 +11,6 @@ import { useDispatch, useSelect } from '@wordpress/data'; import { moreVertical } from '@wordpress/icons'; import { Children, cloneElement } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; -import { displayShortcut } from '@wordpress/keycodes'; import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts'; import { pipe, useCopyToClipboard } from '@wordpress/compose'; @@ -137,6 +136,8 @@ export function BlockSettingsDropdown( { const shortcuts = useSelect( ( select ) => { const { getShortcutRepresentation } = select( keyboardShortcutsStore ); return { + copy: getShortcutRepresentation( 'core/block-editor/copy' ), + cut: getShortcutRepresentation( 'core/block-editor/cut' ), duplicate: getShortcutRepresentation( 'core/block-editor/duplicate' ), @@ -276,18 +277,14 @@ export function BlockSettingsDropdown( { { + registerShortcut( { + name: 'core/block-editor/copy', + category: 'block', + description: __( 'Copy the selected block(s).' ), + keyCombination: { + modifier: 'primary', + character: 'c', + }, + } ); + + registerShortcut( { + name: 'core/block-editor/cut', + category: 'block', + description: __( 'Cut the selected block(s).' ), + keyCombination: { + modifier: 'primary', + character: 'x', + }, + } ); + registerShortcut( { name: 'core/block-editor/duplicate', category: 'block',