1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-09 07:44:14 +01:00

Fix feedkeys

This commit is contained in:
Kris Maglione
2008-11-30 14:33:49 +00:00
parent c72581c6e9
commit fb41ed36b0

View File

@@ -326,7 +326,6 @@ function Events() //{{{
// getBrowser().addEventListener("submit", function (event) // getBrowser().addEventListener("submit", function (event)
// { // {
// // reset buffer loading state as early as possible, important for macros // // reset buffer loading state as early as possible, important for macros
// dump("submit\n");
// buffer.loaded = 0; // buffer.loaded = 0;
// }, null); // }, null);
@@ -878,18 +877,18 @@ function Events() //{{{
let shift = false, ctrl = false, alt = false, meta = false; let shift = false, ctrl = false, alt = false, meta = false;
let string = null; let string = null;
//if (charCode == 92) // the '\' key FIXME: support the escape key //if (keys[i] == "\\") // FIXME: support the escape key
if (charCode == 60 && !escapeKey) // the '<' key starts a complex key if (keys[i] == "<" && !escapeKey) // start a complex key
{ {
let [match, modifier, keyname] = keys.match(/<([CSMA]-)*(.+?)>/i) || []; let [match, modifier, keyname] = keys.substr(i).match(/<([CSMA]-)*(.+?)>/i) || [];
if (keyname) if (keyname)
{ {
if (modifier) // check for modifiers if (modifier) // check for modifiers
{ {
ctrl = /[C]-/i.test(modifier); ctrl = /C-/i.test(modifier);
alt = /[A]-/i.test(modifier); alt = /A-/i.test(modifier);
shift = /[S]-/i.test(modifier); shift = /S-/i.test(modifier);
meta = /[M]-/i.test(modifier); meta = /M-/i.test(modifier);
} }
if (keyname.length == 1) if (keyname.length == 1)
{ {
@@ -1072,10 +1071,6 @@ function Events() //{{{
if (elem && elem.readOnly) if (elem && elem.readOnly)
return; return;
//liberator.log("onFocusChange: " + elem);
//liberator.dump("=+++++++++=\n" + util.objectToString(event.target) + "\n")
//liberator.dump (elem + ": " + win + "\n");//" - target: " + event.target + " - origtarget: " + event.originalTarget + " - expltarget: " + event.explicitOriginalTarget + "\n");
if (elem && ( if (elem && (
(elem instanceof HTMLInputElement && (elem.type.toLowerCase() == "text" || elem.type.toLowerCase() == "password")) || (elem instanceof HTMLInputElement && (elem.type.toLowerCase() == "text" || elem.type.toLowerCase() == "password")) ||
(elem instanceof HTMLSelectElement) (elem instanceof HTMLSelectElement)
@@ -1126,7 +1121,6 @@ function Events() //{{{
// FIXME: currently this hack is disabled to make macros work // FIXME: currently this hack is disabled to make macros work
// this.wantsModeReset = true; // this.wantsModeReset = true;
// setTimeout(function () { // setTimeout(function () {
// liberator.dump("cur: " + liberator.mode + "\n");
// if (events.wantsModeReset) // if (events.wantsModeReset)
// { // {
// events.wantsModeReset = false; // events.wantsModeReset = false;
@@ -1231,7 +1225,7 @@ function Events() //{{{
return true; return true;
//liberator.log(key + " in mode: " + liberator.mode); //liberator.log(key + " in mode: " + liberator.mode);
//liberator.dump(key + " in mode: " + liberator.mode + "\n"); //liberator.dump(key + " in mode: " + liberator.mode);
if (modes.isRecording) if (modes.isRecording)
{ {