1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-29 11:52:26 +01:00

Use a different hack to handle the escape key.

This commit is contained in:
Kris Maglione
2010-10-24 23:04:11 -04:00
parent dc38a2208c
commit cbcd5e8749
2 changed files with 4 additions and 9 deletions

View File

@@ -934,6 +934,10 @@ const Events = Module("events", {
let motionMap = (this._input.pendingMotionMap && this._input.pendingMotionMap.names[0]) || "";
if (!(modes.extended & modes.HINTS))
statusline.updateInputBuffer(motionMap + this._input.buffer);
// This is a stupid, silly, and revolting hack.
if (isEscape(key))
this.onEscape();
}
},
@@ -1034,10 +1038,6 @@ const Events = Module("events", {
};
},
mappings: function () {
mappings.add(modes.all,
["<Esc>", "<C-[>"], "Focus content",
function () { events.onEscape(); });
// add the ":" mapping in all but insert mode mappings
mappings.add(modes.matchModes({ extended: false, input: false }),
[":"], "Enter command line mode",