commands
Listen for the user executing commands that you have registered using the commands
manifest.json key.
Types
commands.Command
-
Object representing a command. This contains the information specified for the command in the
commands
manifest.json key.
Functions
commands.getAll
-
Gets all registered commands for this extension.
commands.reset
-
Reset the given command's description and shortcut to the values given in the manifest key.
commands.update
-
Change the description or shortcut for the given command.
Events
commands.onChanged
-
Fired when the keyboard shortcut for a command is changed.
commands.onCommand
-
Fired when a command is executed using its associated keyboard shortcut.
Example extensions
Browser compatibility
BCD tables only load in the browser
Note:
This API is based on Chromium's chrome.commands
API.