summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorKris Maglione <maglione.k@gmail.com>2010-11-20 14:45:00 -0500
committerKris Maglione <maglione.k@gmail.com>2010-11-20 14:45:00 -0500
commit6358a21cecf966a761ad45a34daf4a79a40d4821 (patch)
tree508c417f6d43590e59572b517f9a68f059441ece /common
parent6817bf55082a3e1427bed10f64e10deaa8c41b85 (diff)
downloadpentadactyl-6358a21cecf966a761ad45a34daf4a79a40d4821.tar.gz
feedkeys magic.
Diffstat (limited to 'common')
-rw-r--r--common/content/events.js14
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)