Skip to content

Commit 06e48f6

Browse files
Add documentation for keyboard shortcut selecting text across multiple blocks (#43164)
--------- Co-authored-by: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com>
1 parent 81893d6 commit 06e48f6

File tree

3 files changed

+44
-0
lines changed
  • docs/explanations
  • packages
    • block-editor/src/components/keyboard-shortcuts
    • edit-post/src/components/keyboard-shortcut-help-modal/test/__snapshots__

3 files changed

+44
-0
lines changed

docs/explanations/faq.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,11 @@ This is the canonical list of keyboard shortcuts:
219219
<td><kbd>Esc</kbd></td>
220220
<td><kbd>Esc</kbd></td>
221221
</tr>
222+
<tr>
223+
<td>Select text across multiple blocks.</td>
224+
<td></td>
225+
<td><kbd>Shift</kbd>+<kbd>Arrow (⇦, ⇧, ⇨, ⇩)</kbd></td>
226+
</tr>
222227
</tbody>
223228
</table>
224229

packages/block-editor/src/components/keyboard-shortcuts/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,16 @@ function KeyboardShortcutsRegister() {
9393
},
9494
} );
9595

96+
registerShortcut( {
97+
name: 'core/block-editor/multi-text-selection',
98+
category: 'selection',
99+
description: __( 'Select text across multiple blocks.' ),
100+
keyCombination: {
101+
modifier: 'shift',
102+
character: 'arrow',
103+
},
104+
} );
105+
96106
registerShortcut( {
97107
name: 'core/block-editor/focus-toolbar',
98108
category: 'global',

packages/edit-post/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,35 @@ exports[`KeyboardShortcutHelpModal should match snapshot when the modal is activ
272272
</kbd>
273273
</div>
274274
</li>
275+
<li
276+
class="edit-post-keyboard-shortcut-help-modal__shortcut"
277+
>
278+
<div
279+
class="edit-post-keyboard-shortcut-help-modal__shortcut-description"
280+
>
281+
Select text across multiple blocks.
282+
</div>
283+
<div
284+
class="edit-post-keyboard-shortcut-help-modal__shortcut-term"
285+
>
286+
<kbd
287+
aria-label="Shift + Arrow"
288+
class="edit-post-keyboard-shortcut-help-modal__shortcut-key-combination"
289+
>
290+
<kbd
291+
class="edit-post-keyboard-shortcut-help-modal__shortcut-key"
292+
>
293+
Shift
294+
</kbd>
295+
+
296+
<kbd
297+
class="edit-post-keyboard-shortcut-help-modal__shortcut-key"
298+
>
299+
Arrow
300+
</kbd>
301+
</kbd>
302+
</div>
303+
</li>
275304
</ul>
276305
</section>
277306
<section

0 commit comments

Comments
 (0)