mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-23 05:15:46 +01:00
Fix mapping : in insert modes.
This commit is contained in:
@@ -1736,7 +1736,7 @@ var CommandLine = Module("commandline", {
|
|||||||
function () { events.feedkeys("<S-Down>"); });
|
function () { events.feedkeys("<S-Down>"); });
|
||||||
|
|
||||||
// add the ":" mapping in all but insert mode mappings
|
// add the ":" mapping in all but insert mode mappings
|
||||||
mappings.add(modes.matchModes({ extended: false, input: false }),
|
mappings.add(modes.COMMAND,
|
||||||
[":"], "Enter command-line mode",
|
[":"], "Enter command-line mode",
|
||||||
function () { commandline.open(":", "", modes.EX); });
|
function () { commandline.open(":", "", modes.EX); });
|
||||||
|
|
||||||
|
|||||||
@@ -36,27 +36,28 @@ var Modes = Module("modes", {
|
|||||||
this.boundProperties = {};
|
this.boundProperties = {};
|
||||||
|
|
||||||
this.addMode("BASE", {
|
this.addMode("BASE", {
|
||||||
char: "b",
|
description: "The base mode for all other modes"
|
||||||
description: "The base mode for most other modes"
|
|
||||||
});
|
});
|
||||||
|
this.addMode("MAIN", {
|
||||||
|
char: "m",
|
||||||
|
description: "The base mode for most other modes",
|
||||||
|
bases: [this.BASE]
|
||||||
|
});
|
||||||
|
this.addMode("COMMAND", {
|
||||||
|
description: "The base mode for most modes which accept commands rather than input",
|
||||||
|
hidden: true
|
||||||
|
});
|
||||||
|
|
||||||
this.addMode("NORMAL", {
|
this.addMode("NORMAL", {
|
||||||
char: "n",
|
char: "n",
|
||||||
description: "Active when nothing is focused",
|
description: "Active when nothing is focused",
|
||||||
|
bases: [this.COMMAND],
|
||||||
display: function () null
|
display: function () null
|
||||||
});
|
});
|
||||||
this.addMode("INPUT", {
|
|
||||||
char: "I",
|
|
||||||
description: "The base mode for input modes, including Insert and Command Line"
|
|
||||||
});
|
|
||||||
this.addMode("INSERT", {
|
|
||||||
char: "i",
|
|
||||||
description: "Active when an input element is focused",
|
|
||||||
input: true,
|
|
||||||
ownsFocus: true
|
|
||||||
});
|
|
||||||
this.addMode("VISUAL", {
|
this.addMode("VISUAL", {
|
||||||
char: "v",
|
char: "v",
|
||||||
description: "Active when text is selected",
|
description: "Active when text is selected",
|
||||||
|
bases: [this.COMMAND],
|
||||||
ownsFocus: true,
|
ownsFocus: true,
|
||||||
display: function () "VISUAL" + (this._extended & modes.LINE ? " LINE" : "")
|
display: function () "VISUAL" + (this._extended & modes.LINE ? " LINE" : "")
|
||||||
}, {
|
}, {
|
||||||
@@ -70,15 +71,9 @@ var Modes = Module("modes", {
|
|||||||
editor.unselectText();
|
editor.unselectText();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.addMode("COMMAND_LINE", {
|
|
||||||
char: "c",
|
|
||||||
description: "Active when the command line is focused",
|
|
||||||
input: true
|
|
||||||
});
|
|
||||||
|
|
||||||
this.addMode("CARET", {
|
this.addMode("CARET", {
|
||||||
description: "Active when the caret is visible in the web content",
|
description: "Active when the caret is visible in the web content",
|
||||||
|
bases: [this.COMMAND]
|
||||||
}, {
|
}, {
|
||||||
|
|
||||||
get pref() prefs.get("accessibility.browsewithcaret"),
|
get pref() prefs.get("accessibility.browsewithcaret"),
|
||||||
@@ -99,8 +94,27 @@ var Modes = Module("modes", {
|
|||||||
this.addMode("TEXT_EDIT", {
|
this.addMode("TEXT_EDIT", {
|
||||||
char: "t",
|
char: "t",
|
||||||
description: "Vim-like editing of input elements",
|
description: "Vim-like editing of input elements",
|
||||||
|
bases: [this.COMMAND],
|
||||||
ownsFocus: true
|
ownsFocus: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.addMode("INPUT", {
|
||||||
|
char: "I",
|
||||||
|
description: "The base mode for input modes, including Insert and Command Line"
|
||||||
|
});
|
||||||
|
this.addMode("INSERT", {
|
||||||
|
char: "i",
|
||||||
|
description: "Active when an input element is focused",
|
||||||
|
input: true,
|
||||||
|
ownsFocus: true
|
||||||
|
});
|
||||||
|
this.addMode("COMMAND_LINE", {
|
||||||
|
char: "c",
|
||||||
|
description: "Active when the command line is focused",
|
||||||
|
input: true
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
this.addMode("EMBED", {
|
this.addMode("EMBED", {
|
||||||
input: true,
|
input: true,
|
||||||
description: "Active when an <embed> or <object> element is focused",
|
description: "Active when an <embed> or <object> element is focused",
|
||||||
@@ -160,7 +174,7 @@ var Modes = Module("modes", {
|
|||||||
input: true
|
input: true
|
||||||
});
|
});
|
||||||
this.addMode("IGNORE", { hidden: true }, {
|
this.addMode("IGNORE", { hidden: true }, {
|
||||||
onEvent: function (event) false,
|
onEvent: function (event) Events.KILL,
|
||||||
bases: []
|
bases: []
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -410,7 +424,7 @@ var Modes = Module("modes", {
|
|||||||
return res;
|
return res;
|
||||||
}),
|
}),
|
||||||
|
|
||||||
get bases() this.input ? [modes.INPUT] : [modes.BASE],
|
get bases() this.input ? [modes.INPUT] : [modes.MAIN],
|
||||||
|
|
||||||
get toStringParams() [this.name],
|
get toStringParams() [this.name],
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user