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