mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 08:17:59 +01:00
Tweak revision 13f6e3a205d4 to be less lenient in Input modes by default.
--HG-- extra : rebase_source : efa3bfb79a40002ff21e2006974ad9c142ae2187
This commit is contained in:
@@ -653,6 +653,11 @@ var Editor = Module("editor", {
|
||||
modes.push(modes.TEXT_EDIT);
|
||||
});
|
||||
|
||||
mappings.add([modes.INPUT],
|
||||
["<BS>", "<Del>", "<Left>", "<Right>", "<Up>", "<Down>"],
|
||||
"Handled by " + config.host,
|
||||
function () Events.PASS);
|
||||
|
||||
mappings.add([modes.INSERT],
|
||||
["<Space>", "<Return>"], "Expand insert mode abbreviation",
|
||||
function () {
|
||||
|
||||
@@ -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,6 +108,7 @@ var ProcessorStack = Class("ProcessorStack", {
|
||||
this.events[0].originalTarget.dactylKeyPress = undefined;
|
||||
|
||||
if (result !== Events.PASS || 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) {
|
||||
@@ -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 () {});
|
||||
|
||||
@@ -468,6 +468,8 @@ var Modes = Module("modes", {
|
||||
|
||||
ownsFocus: Class.memoize(function ownsFocus() this.bases.length && this.bases.some(function (b) b.ownsFocus)),
|
||||
|
||||
passEvent: function passEvent(event) this.input && event.charCode && !(event.ctrlKey || event.altKey || event.metaKey),
|
||||
|
||||
passUnknown: Class.memoize(function () options.get("passunknown").getKey(this.name)),
|
||||
|
||||
get mask() this,
|
||||
@@ -541,7 +543,7 @@ var Modes = Module("modes", {
|
||||
options: function initOptions() {
|
||||
options.add(["passunknown"],
|
||||
"Pass through unknown keys in these modes",
|
||||
"regexplist", "^input$",
|
||||
"regexplist", "",
|
||||
{
|
||||
regexpFlags: "i",
|
||||
setter: function (val) {
|
||||
|
||||
Reference in New Issue
Block a user