Created
August 11, 2013 14:38
-
-
Save onozaty/6205174 to your computer and use it in GitHub Desktop.
work shortcutkey
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var keyElement = aWindow.document.createElement("key"); | |
keyElement.setAttribute("key", key); | |
keyElement.setAttribute("modifiers", modifiers); | |
keyElement.setAttribute("oncommand", "void(0);"); | |
keyElement.addEventListener("command", function() { | |
alert('do command'); | |
}, false); | |
var keysetElement = aWindow.document.createElement("keyset"); | |
keysetElement.appendChild(keyElement); | |
aWindow.document.getElementById("mainKeyset").parentNode.appendChild(keysetElement); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment