Namespace: core/keyboard-shortcuts
.
# getShortcutAliases
Returns the aliases for a given shortcut name.
Parameters
- state
Object
: Global state. - name
string
: Shortcut name.
Returns
Array<WPShortcutKeyCombination>
: Key combinations.
# getShortcutDescription
Returns the shortcut description given its name.
Parameters
- state
Object
: Global state. - name
string
: Shortcut name.
Returns
?string
: Shortcut description.
# getShortcutKeyCombination
Returns the main key combination for a given shortcut name.
Parameters
- state
Object
: Global state. - name
string
: Shortcut name.
Returns
?WPShortcutKeyCombination
: Key combination.
# getShortcutRepresentation
Returns a string representing the main key combination for a given shortcut name.
Parameters
- state
Object
: Global state. - name
string
: Shortcut name. - representation
string
: Type of reprensentation. (display, raw, ariaLabel )
Returns
string
: Shortcut representation.
# registerShortcut
Returns an action object used to register a new keyboard shortcut.
Parameters
- config
WPShortcutConfig
: Shortcut config.
Returns
Object
: action.
# unregisterShortcut
Returns an action object used to unregister a keyboard shortcut.
Parameters
- name
string
: Shortcut name.
Returns
Object
: action.