-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a new keyboard shortcut package (#19100)
- Loading branch information
1 parent
0553213
commit fba1069
Showing
34 changed files
with
956 additions
and
445 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
docs/designers-developers/developers/data/data-core-keyboard-shortcuts.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# The Keyboard Shortcuts Data | ||
|
||
Namespace: `core/keyboard-shortcuts`. | ||
|
||
## Selectors | ||
|
||
<!-- START TOKEN(Autogenerated selectors) --> | ||
|
||
<a name="getShortcutAliases" href="#getShortcutAliases">#</a> **getShortcutAliases** | ||
|
||
Returns the aliases for a given shortcut name. | ||
|
||
_Parameters_ | ||
|
||
- _state_ `Object`: Global state. | ||
- _name_ `string`: Shortcut name. | ||
|
||
_Returns_ | ||
|
||
- `Array<WPShortcutKeyCombination>`: Key combinations. | ||
|
||
<a name="getShortcutDescription" href="#getShortcutDescription">#</a> **getShortcutDescription** | ||
|
||
Returns the shortcut description given its name. | ||
|
||
_Parameters_ | ||
|
||
- _state_ `Object`: Global state. | ||
- _name_ `string`: Shortcut name. | ||
|
||
_Returns_ | ||
|
||
- `?string`: Shortcut description. | ||
|
||
<a name="getShortcutKeyCombination" href="#getShortcutKeyCombination">#</a> **getShortcutKeyCombination** | ||
|
||
Returns the main key combination for a given shortcut name. | ||
|
||
_Parameters_ | ||
|
||
- _state_ `Object`: Global state. | ||
- _name_ `string`: Shortcut name. | ||
|
||
_Returns_ | ||
|
||
- `?WPShortcutKeyCombination`: Key combination. | ||
|
||
|
||
<!-- END TOKEN(Autogenerated selectors) --> | ||
|
||
## Actions | ||
|
||
<!-- START TOKEN(Autogenerated actions) --> | ||
|
||
<a name="registerShortcut" href="#registerShortcut">#</a> **registerShortcut** | ||
|
||
Returns an action object used to register a new keyboard shortcut. | ||
|
||
_Parameters_ | ||
|
||
- _config_ `WPShortcutConfig`: Shortcut config. | ||
|
||
_Returns_ | ||
|
||
- `Object`: action. | ||
|
||
<a name="unregisterShortcut" href="#unregisterShortcut">#</a> **unregisterShortcut** | ||
|
||
Returns an action object used to unregister a keyboard shortcut. | ||
|
||
_Parameters_ | ||
|
||
- _name_ `string`: Shortcut name. | ||
|
||
_Returns_ | ||
|
||
- `Object`: action. | ||
|
||
<!-- END TOKEN(Autogenerated actions) --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.