title: Trigger shortcut in a Chrome extension
body: <p>I am building a Chrome extension, and assigned command <code>_execute_browser_action</code> to <kbd>Alt</kbd>+<kbd>J</kbd>. I want to simulate this in background.js which listens for all commands using </p>
  
  <pre><code>chrome.commands.onCommand.addListener(function(command) { /* ... */ });
  </code></pre>
  
  <p>I want <code>_execute_browser_action</code> to be called through a different command shortcut, say <kbd>Cmd</kbd>+<kbd>Shift</kbd>+<kbd>K</kbd></p>
  
  <p>In my manifest.json I have declared the following:</p>
  
  <pre><code>"commands": {
      "_execute_browser_action": {
          "suggested_key": {
            "mac": "Alt+J",
            "linux": "Ctrl+Shift+J"
          }
      },
      "asdf" : {
          "suggested_key": {
            "default": "Ctrl+Shift+K",
            "mac": "Command+Shift+K"
          },
          "description": "asdf"
      }
    }
  </code></pre>
  
  <p>This is my background.js:</p>
  
  <pre><code>chrome.commands.onCommand.addListener(function(command) {
    console.log('onCommand event received for message: ', command);
    if (command === "asdf") {
      alert("asdf");
      var keyPress = jQuery.Event("keypress");
      keyPress.altKey = true;
      keyPress.ctrlKey = false;
      keyPress.which = 74;
      //how do I trigger this?
    }
  });
  </code></pre>
  
  <p>I want to know how to trigger this so that my popup.html opens.</p>