1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 23:17:59 +01:00

Get rid of spurious <Esc> mappings.

This commit is contained in:
Kris Maglione
2011-01-20 01:07:29 -05:00
parent c5221fc24d
commit e9c55b1c27
2 changed files with 7 additions and 17 deletions

View File

@@ -1687,12 +1687,6 @@ var CommandLine = Module("commandline", {
});
},
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
// 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
// be two lists of the same characters (one here and a regexp in
// mappings.js)
mappings.add(myModes,
mappings.add([modes.COMMAND_LINE],
["<Space>", '"', "'"], "Expand command line abbreviation",
function () {
commandline.resetCompletions();
@@ -1709,7 +1703,7 @@ var CommandLine = Module("commandline", {
return Events.PASS;
});
mappings.add(myModes,
mappings.add([modes.COMMAND_LINE],
["<C-]>", "<C-5>"], "Expand command line abbreviation",
function () { editor.expandAbbreviation(modes.COMMAND_LINE); });
@@ -1720,11 +1714,11 @@ var CommandLine = Module("commandline", {
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",
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",
function () { events.feedkeys("<S-Down>"); });
@@ -1737,10 +1731,6 @@ var CommandLine = Module("commandline", {
function win() commandline.widgets.multilineOutput.contentWindow;
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 DROP = false;
const BEEP = {};

View File

@@ -494,17 +494,17 @@ var Modes = Module("modes", {
mappings.add([modes.BASE],
["<Esc>", "<C-[>"],
"Return to NORMAL mode",
function () { modes.reset() });
function () { modes.reset(); });
mappings.add([modes.INPUT, modes.COMMAND, modes.PASS_THROUGH, modes.QUOTE],
["<Esc>", "<C-[>"],
"Return to the previous mode",
function () { modes.reset() });
function () { modes.pop(); });
mappings.add([modes.MENU],
["<Esc>", "<C-[>"],
"Close the current popup",
function () events.PASS);
function () Events.PASS);
},
prefs: function () {
prefs.watch("accessibility.browsewithcaret", modes.closure.onCaretChange);