I'm trying to use Google's commands API to add hotkeys to my extension but I cannot get anything to print to the console. All the Stack Overflow answers say to check the hotkeys page found in the bottom right of the extensions page. I've checked this and my hotkey is set like it's supposed to be.
Manifest.json
{
"manifest_version": 2,
...
"background": {
"scripts": ["background.js"]
},
"commands": {
"move_tab_up": {
"suggested_key": {
"default": "Ctrl+Shift+K"
},
"description": "move tab up one window"
}
}
Background.js
chrome.commands.onCommand.addListener(function(command) {
console.log("I am a stupid script.", command);
});