diff options
author | Kris Maglione <maglione.k@gmail.com> | 2010-11-20 14:45:00 -0500 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2010-11-20 14:45:00 -0500 |
commit | 6358a21cecf966a761ad45a34daf4a79a40d4821 (patch) | |
tree | 508c417f6d43590e59572b517f9a68f059441ece /common | |
parent | 6817bf55082a3e1427bed10f64e10deaa8c41b85 (diff) | |
download | pentadactyl-6358a21cecf966a761ad45a34daf4a79a40d4821.tar.gz |
feedkeys magic.
Diffstat (limited to 'common')
-rw-r--r-- | common/content/events.js | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/common/content/events.js b/common/content/events.js index 86ee6d26..0fc6432f 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -235,8 +235,6 @@ const Events = Module("events", { * @returns {boolean} */ feedkeys: function (keys, noremap, quiet) { - let doc = window.document; - let view = window.document.defaultView; let wasFeeding = this.feedingKeys; this.feedingKeys = true; @@ -258,15 +256,11 @@ const Events = Module("events", { evt.noremap = !!noremap; evt.isMacro = true; + let event = events.create(document.commandDispatcher.focusedWindow.document, type, evt); if (!evt_obj.dactylString && !evt_obj.dactylShift) - window.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils) - .sendKeyEvent(type, evt.keyCode, evt.charCode, evt.modifiers); - else { // A special hack for dactyl-specific key names. - evt.dactylString = evt_obj.dactylString; // for key-less keypress events e.g. <Nop> - evt.dactylShift = evt_obj.dactylShift; // for untypeable shift keys e.g. <S-1> - events.onKeyPress(evt); - break; - } + events.dispatch(dactyl.focus || buffer.focusedFrame, event); + else + events.onKeyPress(event); } if (!this.feedingKeys) |