mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 21:48:00 +01:00
Get rid of spurious <Esc> mappings.
This commit is contained in:
@@ -1687,12 +1687,6 @@ var CommandLine = Module("commandline", {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
mappings: function () {
|
mappings: function () {
|
||||||
var myModes = [modes.COMMAND_LINE];
|
|
||||||
|
|
||||||
// TODO: move "<Esc>", "<C-[>" here from mappings
|
|
||||||
mappings.add(myModes,
|
|
||||||
["<C-c>"], "Focus content",
|
|
||||||
function () { events.onEscape(); });
|
|
||||||
|
|
||||||
// Any "non-keyword" character triggers abbreviation expansion
|
// Any "non-keyword" character triggers abbreviation expansion
|
||||||
// TODO: Add "<CR>" and "<Tab>" to this list
|
// TODO: Add "<CR>" and "<Tab>" to this list
|
||||||
@@ -1701,7 +1695,7 @@ var CommandLine = Module("commandline", {
|
|||||||
// TODO: Make non-keyword recognition smarter so that there need not
|
// TODO: Make non-keyword recognition smarter so that there need not
|
||||||
// be two lists of the same characters (one here and a regexp in
|
// be two lists of the same characters (one here and a regexp in
|
||||||
// mappings.js)
|
// mappings.js)
|
||||||
mappings.add(myModes,
|
mappings.add([modes.COMMAND_LINE],
|
||||||
["<Space>", '"', "'"], "Expand command line abbreviation",
|
["<Space>", '"', "'"], "Expand command line abbreviation",
|
||||||
function () {
|
function () {
|
||||||
commandline.resetCompletions();
|
commandline.resetCompletions();
|
||||||
@@ -1709,7 +1703,7 @@ var CommandLine = Module("commandline", {
|
|||||||
return Events.PASS;
|
return Events.PASS;
|
||||||
});
|
});
|
||||||
|
|
||||||
mappings.add(myModes,
|
mappings.add([modes.COMMAND_LINE],
|
||||||
["<C-]>", "<C-5>"], "Expand command line abbreviation",
|
["<C-]>", "<C-5>"], "Expand command line abbreviation",
|
||||||
function () { editor.expandAbbreviation(modes.COMMAND_LINE); });
|
function () { editor.expandAbbreviation(modes.COMMAND_LINE); });
|
||||||
|
|
||||||
@@ -1720,11 +1714,11 @@ var CommandLine = Module("commandline", {
|
|||||||
commandline._echoMultiline(commandline._lastMowOutput, commandline.HL_NORMAL);
|
commandline._echoMultiline(commandline._lastMowOutput, commandline.HL_NORMAL);
|
||||||
});
|
});
|
||||||
|
|
||||||
mappings.add(myModes,
|
mappings.add([modes.COMMAND_LINE],
|
||||||
["<C-p>", "<PageUp>"], "Recall the previous command line from the history list",
|
["<C-p>", "<PageUp>"], "Recall the previous command line from the history list",
|
||||||
function () { events.feedkeys("<S-Up>"); });
|
function () { events.feedkeys("<S-Up>"); });
|
||||||
|
|
||||||
mappings.add(myModes,
|
mappings.add([modes.COMMAND_LINE],
|
||||||
["<C-n>", "<PageDown>"], "Recall the next command line from the history list",
|
["<C-n>", "<PageDown>"], "Recall the next command line from the history list",
|
||||||
function () { events.feedkeys("<S-Down>"); });
|
function () { events.feedkeys("<S-Down>"); });
|
||||||
|
|
||||||
@@ -1737,10 +1731,6 @@ var CommandLine = Module("commandline", {
|
|||||||
function win() commandline.widgets.multilineOutput.contentWindow;
|
function win() commandline.widgets.multilineOutput.contentWindow;
|
||||||
function atEnd(dir) !Buffer.isScrollable(body(), dir || 1);
|
function atEnd(dir) !Buffer.isScrollable(body(), dir || 1);
|
||||||
|
|
||||||
mappings.add([modes.OUTPUT_MULTILINE],
|
|
||||||
["<Esc>", "<C-[>"], "Exit multi-line output mode",
|
|
||||||
function () {});
|
|
||||||
|
|
||||||
const PASS = true;
|
const PASS = true;
|
||||||
const DROP = false;
|
const DROP = false;
|
||||||
const BEEP = {};
|
const BEEP = {};
|
||||||
|
|||||||
@@ -494,17 +494,17 @@ var Modes = Module("modes", {
|
|||||||
mappings.add([modes.BASE],
|
mappings.add([modes.BASE],
|
||||||
["<Esc>", "<C-[>"],
|
["<Esc>", "<C-[>"],
|
||||||
"Return to NORMAL mode",
|
"Return to NORMAL mode",
|
||||||
function () { modes.reset() });
|
function () { modes.reset(); });
|
||||||
|
|
||||||
mappings.add([modes.INPUT, modes.COMMAND, modes.PASS_THROUGH, modes.QUOTE],
|
mappings.add([modes.INPUT, modes.COMMAND, modes.PASS_THROUGH, modes.QUOTE],
|
||||||
["<Esc>", "<C-[>"],
|
["<Esc>", "<C-[>"],
|
||||||
"Return to the previous mode",
|
"Return to the previous mode",
|
||||||
function () { modes.reset() });
|
function () { modes.pop(); });
|
||||||
|
|
||||||
mappings.add([modes.MENU],
|
mappings.add([modes.MENU],
|
||||||
["<Esc>", "<C-[>"],
|
["<Esc>", "<C-[>"],
|
||||||
"Close the current popup",
|
"Close the current popup",
|
||||||
function () events.PASS);
|
function () Events.PASS);
|
||||||
},
|
},
|
||||||
prefs: function () {
|
prefs: function () {
|
||||||
prefs.watch("accessibility.browsewithcaret", modes.closure.onCaretChange);
|
prefs.watch("accessibility.browsewithcaret", modes.closure.onCaretChange);
|
||||||
|
|||||||
Reference in New Issue
Block a user