Skip to content

Instantly share code, notes, and snippets.

@onozaty
Created July 20, 2013 14:57
Show Gist options
  • Save onozaty/6045356 to your computer and use it in GitHub Desktop.
Save onozaty/6045356 to your computer and use it in GitHub Desktop.
Command of the shortcut key does not work
var mainKeyset = aWindow.document.getElementById("mainKeyset");
var keyElement = aWindow.document.createElement("key");
keyElement.setAttribute("id", SHORTCUT_KEY_ELEMENT_ID);
keyElement.setAttribute("key", key);
keyElement.setAttribute("modifiers", modifiers);
keyElement.setAttribute("oncommand", "void(0);");
keyElement.addEventListener("command", function() {
openIncSearch(aWindow);
}, false);
mainKeyset.appendChild(keyElement);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment