Chrome Extension Keyboard Shortcuts (chrome.commands)
Wire keyboard shortcuts into your extension with chrome.commands — including the reserved _execute_action shortcut.

Power users judge an extension by whether they can drive it from the keyboard. The commands API adds shortcuts in a few lines of manifest JSON.
Declaring commands
"commands": { "_execute_action": { "suggested_key": { "default": "Ctrl+Shift+Y", "mac": "Command+Shift+Y" } }, "toggle-focus": { "suggested_key": { "default": "Ctrl+Shift+U" }, "description": "Toggle focus mode" } }
Rules you must follow
- _execute_action is reserved and opens your popup — it takes no listener.
- Only four suggested shortcuts are assigned automatically; extras need manual setup by the user.
- Shortcuts must include Ctrl, Alt or Command (Shift alone is not enough).
- Chrome-reserved combinations like Ctrl+T are silently ignored.
Handling custom commands
chrome.commands.onCommand.addListener((command) => ...) fires in the service worker. Branch on the command id and do the work there, or forward it to the active tab.
Let users remap
Link to chrome://extensions/shortcuts from your options page. Chrome blocks extensions from opening that URL directly, so render it as copyable text or a plain instruction.