mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-06 17:15:46 +01:00
Fix :listkeys.
This commit is contained in:
@@ -208,7 +208,6 @@ const Buffer = Module("buffer", {
|
||||
}
|
||||
|
||||
if (doc instanceof HTMLDocument) {
|
||||
|
||||
if (doc.defaultView.frameElement) {
|
||||
// document is part of a frameset
|
||||
|
||||
@@ -1504,12 +1503,9 @@ const Buffer = Module("buffer", {
|
||||
.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIXULWindow)
|
||||
.XULBrowserWindow = this.progressListener;
|
||||
|
||||
let appContent = document.getElementById("appcontent");
|
||||
if (appContent) {
|
||||
events.addSessionListener(appContent, "DOMContentLoaded", this.closure.onDOMContentLoaded, true);
|
||||
events.addSessionListener(appContent, "load", this.closure.onPageLoad, true);
|
||||
events.addSessionListener(appContent, "scroll", this.closure._updateBufferPosition, false);
|
||||
}
|
||||
events.addSessionListener(config.browser, "DOMContentLoaded", this.closure.onDOMContentLoaded, true);
|
||||
events.addSessionListener(config.browser, "load", this.closure.onPageLoad, true);
|
||||
events.addSessionListener(config.browser, "scroll", this.closure._updateBufferPosition, false);
|
||||
},
|
||||
mappings: function () {
|
||||
var myModes = config.browserModes;
|
||||
|
||||
@@ -1113,11 +1113,11 @@ const Events = Module("events", {
|
||||
function () { commandline.open(":", "", modes.EX); });
|
||||
|
||||
// focus events
|
||||
mappings.add([modes.NORMAL, modes.PLAYER, modes.VISUAL, modes.CARET],
|
||||
mappings.add([modes.NORMAL, modes.PLAYER, modes.VISUAL, modes.CARET].filter(util.identity),
|
||||
["<Tab>"], "Advance keyboard focus",
|
||||
function () { document.commandDispatcher.advanceFocus(); });
|
||||
|
||||
mappings.add([modes.NORMAL, modes.PLAYER, modes.VISUAL, modes.CARET, modes.INSERT, modes.TEXT_EDIT],
|
||||
mappings.add([modes.NORMAL, modes.PLAYER, modes.VISUAL, modes.CARET, modes.INSERT, modes.TEXT_EDIT].filter(util.identity),
|
||||
["<S-Tab>"], "Rewind keyboard focus",
|
||||
function () { document.commandDispatcher.rewindFocus(); });
|
||||
|
||||
@@ -1134,12 +1134,12 @@ const Events = Module("events", {
|
||||
function () { return; });
|
||||
|
||||
// macros
|
||||
mappings.add([modes.NORMAL, modes.PLAYER, modes.MESSAGE],
|
||||
mappings.add([modes.NORMAL, modes.PLAYER, modes.MESSAGE].filter(util.identity),
|
||||
["q"], "Record a key sequence into a macro",
|
||||
function (arg) { events.startRecording(arg); },
|
||||
{ arg: true });
|
||||
|
||||
mappings.add([modes.NORMAL, modes.PLAYER, modes.MESSAGE],
|
||||
mappings.add([modes.NORMAL, modes.PLAYER, modes.MESSAGE].filter(util.identity),
|
||||
["@"], "Play a macro",
|
||||
function (count, arg) {
|
||||
count = Math.max(count, 1);
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
const Map = Class("Map", {
|
||||
init: function (modes, keys, description, action, extraInfo) {
|
||||
modes = Array.concat(modes).map(function (m) isObject(m) ? m.mask : m);
|
||||
if (!modes.every(util.identity))
|
||||
throw Error("Invalid modes");
|
||||
|
||||
this.id = ++Map.id;
|
||||
this.modes = modes;
|
||||
|
||||
@@ -29,7 +29,7 @@ const Modes = Module("modes", {
|
||||
}
|
||||
});
|
||||
|
||||
this._mainModes = [this.NONE];
|
||||
this._mainModes = [];
|
||||
this._lastMode = 0;
|
||||
this._modeMap = {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user