Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var evt = document.createEvent("KeyEvents");
- evt.initKeyEvent(
- "keydown",
- true,
- true,
- null,
- false, // holds Ctrl key
- true, // holds Alt key
- true, // holds Shift key
- false, // holds Meta key
- evt.DOM_VK_R, // presses a special key,
- 0 // presses a normal key, e.g. "A".charCodeAt(0),
- );
- gBrowser.contentDocument.documentElement.dispatchEvent(evt);;
Advertisement
Add Comment
Please, Sign In to add comment