1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 09:07:58 +01:00

Make <Esc> a normal mapping rather than a grotesque hack.

This commit is contained in:
Kris Maglione
2011-01-19 20:30:54 -05:00
parent a8a840afc2
commit 95eb8aaf93
4 changed files with 19 additions and 32 deletions

View File

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