Files
chrome-extensions-samples/api-samples/commands/manifest.json
Michael Lip e85e798a37 feat: add chrome.commands API sample (#1629)
Add a new MV3 sample demonstrating the chrome.commands API.

The sample registers custom keyboard shortcuts in the manifest,
handles command events in the service worker with notifications
and badge text feedback, and uses chrome.commands.getAll() in the
popup to display all registered shortcuts.

Closes #1126
2026-03-04 11:18:27 +01:00

40 lines
958 B
JSON

{
"name": "Commands API Demo",
"version": "1.0",
"description": "Uses the chrome.commands API to define keyboard shortcuts and handle command events.",
"manifest_version": 3,
"background": {
"service_worker": "background.js"
},
"permissions": ["notifications"],
"icons": {
"16": "images/icon-16.png",
"48": "images/icon-48.png",
"128": "images/icon-128.png"
},
"action": {
"default_popup": "popup.html",
"default_icon": {
"16": "images/icon-16.png",
"48": "images/icon-48.png",
"128": "images/icon-128.png"
}
},
"commands": {
"run-action": {
"suggested_key": {
"default": "Ctrl+Shift+Y",
"mac": "Command+Shift+Y"
},
"description": "Run the sample action"
},
"toggle-feature": {
"suggested_key": {
"default": "Ctrl+Shift+U",
"mac": "Command+Shift+U"
},
"description": "Toggle a feature on or off"
}
}
}