Skip to content

Commit

Permalink
Add Alt + F10 (navigate to the nearest toolbar) to the shortcut docs …
Browse files Browse the repository at this point in the history
…and modal (#11096)
  • Loading branch information
talldan committed Oct 30, 2018
1 parent d44a1bf commit ca4e9fd
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/reference/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ This is the canonical list of keyboard shortcuts:
<td><kbd>Shift</kbd>+<kbd>Alt</kbd>+<kbd>P</kbd></td>
<td><kbd>⇧</kbd><kbd>⌥</kbd><kbd>P</kbd></td>
</tr>
<tr>
<td>Navigate to the nearest toolbar.</td>
<td><kbd>Alt</kbd>+<kbd>F10</kbd></td>
<td><kbd>⌥</kbd><kbd>F10</kbd></td>
</tr>
<tr>
<td>Switch between Visual Editor and Code Editor.</td>
<td><kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Alt</kbd>+<kbd>M</kbd></td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const {
// Ctrl+Alt+<key> on a mac, Shift+Alt+<key> elsewhere.
access,
ctrl,
alt,
ctrlShift,
shiftAlt,
} = displayShortcutList;
Expand Down Expand Up @@ -66,6 +67,10 @@ const globalShortcuts = {
keyCombination: shiftAlt( 'p' ),
description: __( 'Navigate to the previous part of the editor (alternative).' ),
},
{
keyCombination: alt( 'F10' ),
description: __( 'Navigate to the nearest toolbar.' ),
},
{
keyCombination: secondary( 'm' ),
description: __( 'Switch between Visual Editor and Code Editor.' ),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@ exports[`KeyboardShortcutHelpModal should match snapshot when the modal is activ
"P",
],
},
Object {
"description": "Navigate to the nearest toolbar.",
"keyCombination": Array [
"Alt",
"+",
"F10",
],
},
Object {
"description": "Switch between Visual Editor and Code Editor.",
"keyCombination": Array [
Expand Down
1 change: 1 addition & 0 deletions packages/keycodes/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const modifiers = {
secondary: ( _isApple ) => _isApple() ? [ SHIFT, ALT, COMMAND ] : [ CTRL, SHIFT, ALT ],
access: ( _isApple ) => _isApple() ? [ CTRL, ALT ] : [ SHIFT, ALT ],
ctrl: () => [ CTRL ],
alt: () => [ ALT ],
ctrlShift: () => [ CTRL, SHIFT ],
shift: () => [ SHIFT ],
shiftAlt: () => [ SHIFT, ALT ],
Expand Down

0 comments on commit ca4e9fd

Please sign in to comment.