1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-23 05:25:48 +01:00

Tweak revision 13f6e3a205d4 to be less lenient in Input modes by default.

--HG--
extra : rebase_source : efa3bfb79a40002ff21e2006974ad9c142ae2187
This commit is contained in:
Kris Maglione
2011-03-12 11:43:11 -05:00
parent 27de24f852
commit 45ba165366
3 changed files with 16 additions and 3 deletions

View File

@@ -91,7 +91,8 @@ var ProcessorStack = Class("ProcessorStack", {
if (options["timeout"])
this.timer = services.Timer(this, options["timeoutlen"], services.Timer.TYPE_ONE_SHOT);
}
else if (result !== Events.KILL && !this.actions.length && !this.passUnknown) {
else if (result !== Events.KILL && !this.actions.length &&
!(this.passUnknown || this.modes.some(function (m) m.passEvent(this), this.events[0]))) {
result = Events.ABORT;
if (!Events.isEscape(this.events.slice(-1)[0]))
dactyl.beep();
@@ -107,7 +108,8 @@ var ProcessorStack = Class("ProcessorStack", {
this.events[0].originalTarget.dactylKeyPress = undefined;
if (result !== Events.PASS || this.events.length > 1)
Events.kill(this.events[this.events.length - 1]);
if (result !== Events.ABORT || !this.events[0].isReplay)
Events.kill(this.events[this.events.length - 1]);
if (result === Events.PASS_THROUGH) {
events.passing = true;
@@ -1544,6 +1546,10 @@ var Events = Module("events", {
modes.push(modes.QUOTE);
});
mappings.add([modes.BASE],
["<CapsLock>"], "Do Nothing",
function () {});
mappings.add([modes.BASE],
["<Nop>"], "Do nothing",
function () {});