commands
Listens for the user executing commands registered using thecommands manifest.json key.
Also provides features to update the shortcut key settings. SeeUpdating shortcuts in thecommands manifest.json key guide for more information.
In this article
Types
commands.CommandObject containing a command's settings.
Functions
commands.getAllGets all registered commands for the extension.
commands.openShortcutSettingsOpens the Manage Extension Shortcuts page, highlighting the extension's shortcut options, if it has any.
commands.resetResets a command's description and shortcut to the values given in the manifest key.
commands.updateChanges the description or shortcut for a command.
Events
commands.onChangedFired when the keyboard shortcut for a command is changed.
commands.onCommandFired when a command is executed using its associated keyboard shortcut.
Example extensions
Browser compatibility
Note:This API is based on Chromium'schrome.commands API.