This sample demonstrates the chrome.commands API by defining custom keyboard shortcuts and responding to command events.
The extension registers two custom keyboard shortcuts in the manifest and listens for them using chrome.commands.onCommand. One command shows a notification, the other toggles a feature on and off with badge text feedback. The popup uses chrome.commands.getAll() to display all registered shortcuts and their current key bindings.
- Clone this repository.
- Load this directory in Chrome as an unpacked extension.
- Use the keyboard shortcuts shown in the popup or customize them at
chrome://extensions/shortcuts.