1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-28 14:33:36 +01:00

Add preliminary mode inheritance and BASE/INSERT modes.

This commit is contained in:
Kris Maglione
2011-01-18 18:37:38 -05:00
parent b836cc8110
commit 551f777c22
4 changed files with 38 additions and 7 deletions

View File

@@ -959,7 +959,7 @@ var Events = Module("events", {
if (overrideMode)
processors = [Events.KeyProcessor(overrideMode, mode.extended)];
else {
let keyModes = array(mode.params.keyModes || []).concat([mode.params.mainMode, mode.main]).compact();
let keyModes = array([mode.params.keyModes, mode.main, mode.main.allBases]).flatten().compact();
let hives = mappings.hives.slice(event.noremap ? -1 : 0);
@@ -972,7 +972,7 @@ var Events = Module("events", {
input.preExecute = mode.params.preExecute;
if (mode.params.postExecute)
input.postExecute = mode.params.postExecute;
if (mode.params.onEvent && i == processors.length - 1)
if (mode.params.onEvent && input.hive === mappings.builtinHive)
input.fallthrough = function (event) {
// Bloody hell.
if (events.toString(event) === "<C-h>")