mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 11:18:00 +01:00
Add macro utility bindings. Add named aliases for some mappings.
--HG-- branch : key-processing
This commit is contained in:
@@ -65,7 +65,7 @@ var Browser = Module("browser", {
|
|||||||
|
|
||||||
mappings: function () {
|
mappings: function () {
|
||||||
mappings.add([modes.NORMAL],
|
mappings.add([modes.NORMAL],
|
||||||
["y"], "Yank current location to the clipboard",
|
["y", "<yank-location>"], "Yank current location to the clipboard",
|
||||||
function () { dactyl.clipboardWrite(buffer.uri.spec, true); });
|
function () { dactyl.clipboardWrite(buffer.uri.spec, true); });
|
||||||
|
|
||||||
// opening websites
|
// opening websites
|
||||||
|
|||||||
@@ -1651,7 +1651,7 @@ var Buffer = Module("buffer", {
|
|||||||
mappings: function () {
|
mappings: function () {
|
||||||
var myModes = config.browserModes;
|
var myModes = config.browserModes;
|
||||||
|
|
||||||
mappings.add(myModes, ["."],
|
mappings.add(myModes, [".", "<repeat-key>"],
|
||||||
"Repeat the last key event",
|
"Repeat the last key event",
|
||||||
function (args) {
|
function (args) {
|
||||||
if (mappings.repeat) {
|
if (mappings.repeat) {
|
||||||
@@ -1670,31 +1670,31 @@ var Buffer = Module("buffer", {
|
|||||||
function () { ex.stop(); });
|
function () { ex.stop(); });
|
||||||
|
|
||||||
// scrolling
|
// scrolling
|
||||||
mappings.add(myModes, ["j", "<Down>", "<C-e>"],
|
mappings.add(myModes, ["j", "<Down>", "<C-e>", "<scroll-down-line>"],
|
||||||
"Scroll document down",
|
"Scroll document down",
|
||||||
function (args) { buffer.scrollVertical("lines", Math.max(args.count, 1)); },
|
function (args) { buffer.scrollVertical("lines", Math.max(args.count, 1)); },
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
mappings.add(myModes, ["k", "<Up>", "<C-y>"],
|
mappings.add(myModes, ["k", "<Up>", "<C-y>", "<scroll-up-line>"],
|
||||||
"Scroll document up",
|
"Scroll document up",
|
||||||
function (args) { buffer.scrollVertical("lines", -Math.max(args.count, 1)); },
|
function (args) { buffer.scrollVertical("lines", -Math.max(args.count, 1)); },
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
mappings.add(myModes, dactyl.has("mail") ? ["h"] : ["h", "<Left>"],
|
mappings.add(myModes, dactyl.has("mail") ? ["h", "<scroll-left-column>"] : ["h", "<Left>", "<scroll-left-column>"],
|
||||||
"Scroll document to the left",
|
"Scroll document to the left",
|
||||||
function (args) { buffer.scrollHorizontal("columns", -Math.max(args.count, 1)); },
|
function (args) { buffer.scrollHorizontal("columns", -Math.max(args.count, 1)); },
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
mappings.add(myModes, dactyl.has("mail") ? ["l"] : ["l", "<Right>"],
|
mappings.add(myModes, dactyl.has("mail") ? ["l", "<scroll-right-column>"] : ["l", "<Right>", "<scroll-right-column>"],
|
||||||
"Scroll document to the right",
|
"Scroll document to the right",
|
||||||
function (args) { buffer.scrollHorizontal("columns", Math.max(args.count, 1)); },
|
function (args) { buffer.scrollHorizontal("columns", Math.max(args.count, 1)); },
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
mappings.add(myModes, ["0", "^"],
|
mappings.add(myModes, ["0", "^", "<scroll-begin>"],
|
||||||
"Scroll to the absolute left of the document",
|
"Scroll to the absolute left of the document",
|
||||||
function () { buffer.scrollToPercent(0, null); });
|
function () { buffer.scrollToPercent(0, null); });
|
||||||
|
|
||||||
mappings.add(myModes, ["$"],
|
mappings.add(myModes, ["$", "<scroll-end>"],
|
||||||
"Scroll to the absolute right of the document",
|
"Scroll to the absolute right of the document",
|
||||||
function () { buffer.scrollToPercent(100, null); });
|
function () { buffer.scrollToPercent(100, null); });
|
||||||
|
|
||||||
@@ -1708,7 +1708,7 @@ var Buffer = Module("buffer", {
|
|||||||
function (args) { buffer.scrollToPercent(null, args.count != null ? args.count : 100); },
|
function (args) { buffer.scrollToPercent(null, args.count != null ? args.count : 100); },
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
mappings.add(myModes, ["%"],
|
mappings.add(myModes, ["%", "<scroll-percent>"],
|
||||||
"Scroll to {count} percent of the document",
|
"Scroll to {count} percent of the document",
|
||||||
function (args) {
|
function (args) {
|
||||||
dactyl.assert(args.count > 0 && args.count <= 100);
|
dactyl.assert(args.count > 0 && args.count <= 100);
|
||||||
@@ -1716,59 +1716,59 @@ var Buffer = Module("buffer", {
|
|||||||
},
|
},
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
mappings.add(myModes, ["<C-d>"],
|
mappings.add(myModes, ["<C-d>", "<scroll-down>"],
|
||||||
"Scroll window downwards in the buffer",
|
"Scroll window downwards in the buffer",
|
||||||
function (args) { buffer._scrollByScrollSize(args.count, true); },
|
function (args) { buffer._scrollByScrollSize(args.count, true); },
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
mappings.add(myModes, ["<C-u>"],
|
mappings.add(myModes, ["<C-u>", "<scroll-up>"],
|
||||||
"Scroll window upwards in the buffer",
|
"Scroll window upwards in the buffer",
|
||||||
function (args) { buffer._scrollByScrollSize(args.count, false); },
|
function (args) { buffer._scrollByScrollSize(args.count, false); },
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
mappings.add(myModes, ["<C-b>", "<PageUp>", "<S-Space>"],
|
mappings.add(myModes, ["<C-b>", "<PageUp>", "<S-Space>", "<scroll-page-up>"],
|
||||||
"Scroll up a full page",
|
"Scroll up a full page",
|
||||||
function (args) { buffer.scrollVertical("pages", -Math.max(args.count, 1)); },
|
function (args) { buffer.scrollVertical("pages", -Math.max(args.count, 1)); },
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
mappings.add(myModes, ["<C-f>", "<PageDown>", "<Space>"],
|
mappings.add(myModes, ["<C-f>", "<PageDown>", "<Space>", "<scroll-page-down>"],
|
||||||
"Scroll down a full page",
|
"Scroll down a full page",
|
||||||
function (args) { buffer.scrollVertical("pages", Math.max(args.count, 1)); },
|
function (args) { buffer.scrollVertical("pages", Math.max(args.count, 1)); },
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
mappings.add(myModes, ["]f"],
|
mappings.add(myModes, ["]f", "<previous-frame>"],
|
||||||
"Focus next frame",
|
"Focus next frame",
|
||||||
function (args) { buffer.shiftFrameFocus(Math.max(args.count, 1)); },
|
function (args) { buffer.shiftFrameFocus(Math.max(args.count, 1)); },
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
mappings.add(myModes, ["[f"],
|
mappings.add(myModes, ["[f", "<next-frame>"],
|
||||||
"Focus previous frame",
|
"Focus previous frame",
|
||||||
function (args) { buffer.shiftFrameFocus(-Math.max(args.count, 1)); },
|
function (args) { buffer.shiftFrameFocus(-Math.max(args.count, 1)); },
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
mappings.add(myModes, ["]]"],
|
mappings.add(myModes, ["]]", "<next-page>"],
|
||||||
"Follow the link labeled 'next' or '>' if it exists",
|
"Follow the link labeled 'next' or '>' if it exists",
|
||||||
function (args) {
|
function (args) {
|
||||||
buffer.findLink("next", options["nextpattern"], (args.count || 1) - 1, true);
|
buffer.findLink("next", options["nextpattern"], (args.count || 1) - 1, true);
|
||||||
},
|
},
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
mappings.add(myModes, ["[["],
|
mappings.add(myModes, ["[[", "<previous-page>"],
|
||||||
"Follow the link labeled 'prev', 'previous' or '<' if it exists",
|
"Follow the link labeled 'prev', 'previous' or '<' if it exists",
|
||||||
function (args) {
|
function (args) {
|
||||||
buffer.findLink("previous", options["previouspattern"], (args.count || 1) - 1, true);
|
buffer.findLink("previous", options["previouspattern"], (args.count || 1) - 1, true);
|
||||||
},
|
},
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
mappings.add(myModes, ["gf"],
|
mappings.add(myModes, ["gf", "<view-source>"],
|
||||||
"Toggle between rendered and source view",
|
"Toggle between rendered and source view",
|
||||||
function () { buffer.viewSource(null, false); });
|
function () { buffer.viewSource(null, false); });
|
||||||
|
|
||||||
mappings.add(myModes, ["gF"],
|
mappings.add(myModes, ["gF", "<view-source-externally>"],
|
||||||
"View source with an external editor",
|
"View source with an external editor",
|
||||||
function () { buffer.viewSource(null, true); });
|
function () { buffer.viewSource(null, true); });
|
||||||
|
|
||||||
mappings.add(myModes, ["gi"],
|
mappings.add(myModes, ["gi", "<focus-input>"],
|
||||||
"Focus last used input field",
|
"Focus last used input field",
|
||||||
function (args) {
|
function (args) {
|
||||||
let elem = buffer.lastInputField;
|
let elem = buffer.lastInputField;
|
||||||
@@ -1808,7 +1808,7 @@ var Buffer = Module("buffer", {
|
|||||||
dactyl.open(url, { from: "paste", where: dactyl.NEW_TAB, background: true });
|
dactyl.open(url, { from: "paste", where: dactyl.NEW_TAB, background: true });
|
||||||
});
|
});
|
||||||
|
|
||||||
mappings.add(myModes, ["p", "<MiddleMouse>"],
|
mappings.add(myModes, ["p", "<MiddleMouse>", "<open-clipboard-url>"],
|
||||||
"Open (put) a URL based on the current clipboard contents in the current buffer",
|
"Open (put) a URL based on the current clipboard contents in the current buffer",
|
||||||
function () {
|
function () {
|
||||||
let url = dactyl.clipboardRead();
|
let url = dactyl.clipboardRead();
|
||||||
@@ -1816,7 +1816,7 @@ var Buffer = Module("buffer", {
|
|||||||
dactyl.open(url);
|
dactyl.open(url);
|
||||||
});
|
});
|
||||||
|
|
||||||
mappings.add(myModes, ["P"],
|
mappings.add(myModes, ["P", "<tab-open-clipboard-url>"],
|
||||||
"Open (put) a URL based on the current clipboard contents in a new buffer",
|
"Open (put) a URL based on the current clipboard contents in a new buffer",
|
||||||
function () {
|
function () {
|
||||||
let url = dactyl.clipboardRead();
|
let url = dactyl.clipboardRead();
|
||||||
@@ -1825,16 +1825,16 @@ var Buffer = Module("buffer", {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// reloading
|
// reloading
|
||||||
mappings.add(myModes, ["r"],
|
mappings.add(myModes, ["r", "<reload>"],
|
||||||
"Reload the current web page",
|
"Reload the current web page",
|
||||||
function () { tabs.reload(tabs.getTab(), false); });
|
function () { tabs.reload(tabs.getTab(), false); });
|
||||||
|
|
||||||
mappings.add(myModes, ["R"],
|
mappings.add(myModes, ["R", "<full-reload>"],
|
||||||
"Reload while skipping the cache",
|
"Reload while skipping the cache",
|
||||||
function () { tabs.reload(tabs.getTab(), true); });
|
function () { tabs.reload(tabs.getTab(), true); });
|
||||||
|
|
||||||
// yanking
|
// yanking
|
||||||
mappings.add(myModes, ["Y"],
|
mappings.add(myModes, ["Y", "<yank-word>"],
|
||||||
"Copy selected text or current word",
|
"Copy selected text or current word",
|
||||||
function () {
|
function () {
|
||||||
let sel = buffer.getCurrentWord();
|
let sel = buffer.getCurrentWord();
|
||||||
@@ -1843,62 +1843,62 @@ var Buffer = Module("buffer", {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// zooming
|
// zooming
|
||||||
mappings.add(myModes, ["zi", "+"],
|
mappings.add(myModes, ["zi", "+", "<text-zoom-in>"],
|
||||||
"Enlarge text zoom of current web page",
|
"Enlarge text zoom of current web page",
|
||||||
function (args) { buffer.zoomIn(Math.max(args.count, 1), false); },
|
function (args) { buffer.zoomIn(Math.max(args.count, 1), false); },
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
mappings.add(myModes, ["zm"],
|
mappings.add(myModes, ["zm", "<text-zoom-more>"],
|
||||||
"Enlarge text zoom of current web page by a larger amount",
|
"Enlarge text zoom of current web page by a larger amount",
|
||||||
function (args) { buffer.zoomIn(Math.max(args.count, 1) * 3, false); },
|
function (args) { buffer.zoomIn(Math.max(args.count, 1) * 3, false); },
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
mappings.add(myModes, ["zo", "-"],
|
mappings.add(myModes, ["zo", "-", "<text-zoom-out>"],
|
||||||
"Reduce text zoom of current web page",
|
"Reduce text zoom of current web page",
|
||||||
function (args) { buffer.zoomOut(Math.max(args.count, 1), false); },
|
function (args) { buffer.zoomOut(Math.max(args.count, 1), false); },
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
mappings.add(myModes, ["zr"],
|
mappings.add(myModes, ["zr", "<text-zoom-reduce>"],
|
||||||
"Reduce text zoom of current web page by a larger amount",
|
"Reduce text zoom of current web page by a larger amount",
|
||||||
function (args) { buffer.zoomOut(Math.max(args.count, 1) * 3, false); },
|
function (args) { buffer.zoomOut(Math.max(args.count, 1) * 3, false); },
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
mappings.add(myModes, ["zz"],
|
mappings.add(myModes, ["zz", "<text-zoom>"],
|
||||||
"Set text zoom value of current web page",
|
"Set text zoom value of current web page",
|
||||||
function (args) { buffer.setZoom(args.count > 1 ? args.count : 100, false); },
|
function (args) { buffer.setZoom(args.count > 1 ? args.count : 100, false); },
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
mappings.add(myModes, ["ZI", "zI"],
|
mappings.add(myModes, ["ZI", "zI", "<full-zoom-in>"],
|
||||||
"Enlarge full zoom of current web page",
|
"Enlarge full zoom of current web page",
|
||||||
function (args) { buffer.zoomIn(Math.max(args.count, 1), true); },
|
function (args) { buffer.zoomIn(Math.max(args.count, 1), true); },
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
mappings.add(myModes, ["ZM", "zM"],
|
mappings.add(myModes, ["ZM", "zM", "<full-zoom-more>"],
|
||||||
"Enlarge full zoom of current web page by a larger amount",
|
"Enlarge full zoom of current web page by a larger amount",
|
||||||
function (args) { buffer.zoomIn(Math.max(args.count, 1) * 3, true); },
|
function (args) { buffer.zoomIn(Math.max(args.count, 1) * 3, true); },
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
mappings.add(myModes, ["ZO", "zO"],
|
mappings.add(myModes, ["ZO", "zO", "<full-zoom-out>"],
|
||||||
"Reduce full zoom of current web page",
|
"Reduce full zoom of current web page",
|
||||||
function (args) { buffer.zoomOut(Math.max(args.count, 1), true); },
|
function (args) { buffer.zoomOut(Math.max(args.count, 1), true); },
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
mappings.add(myModes, ["ZR", "zR"],
|
mappings.add(myModes, ["ZR", "zR", "<full-zoom-reduce>"],
|
||||||
"Reduce full zoom of current web page by a larger amount",
|
"Reduce full zoom of current web page by a larger amount",
|
||||||
function (args) { buffer.zoomOut(Math.max(args.count, 1) * 3, true); },
|
function (args) { buffer.zoomOut(Math.max(args.count, 1) * 3, true); },
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
mappings.add(myModes, ["zZ"],
|
mappings.add(myModes, ["zZ", "<full-zoom>"],
|
||||||
"Set full zoom value of current web page",
|
"Set full zoom value of current web page",
|
||||||
function (args) { buffer.setZoom(args.count > 1 ? args.count : 100, true); },
|
function (args) { buffer.setZoom(args.count > 1 ? args.count : 100, true); },
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
// page info
|
// page info
|
||||||
mappings.add(myModes, ["<C-g>"],
|
mappings.add(myModes, ["<C-g>", "<page-info>"],
|
||||||
"Print the current file name",
|
"Print the current file name",
|
||||||
function () { buffer.showPageInfo(false); });
|
function () { buffer.showPageInfo(false); });
|
||||||
|
|
||||||
mappings.add(myModes, ["g<C-g>"],
|
mappings.add(myModes, ["g<C-g>", "<more-page-info>"],
|
||||||
"Print file information",
|
"Print file information",
|
||||||
function () { buffer.showPageInfo(true); });
|
function () { buffer.showPageInfo(true); });
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -372,7 +372,6 @@ var CommandMode = Class("CommandMode", {
|
|||||||
if (!this.completions.itemList.visible)
|
if (!this.completions.itemList.visible)
|
||||||
this.autocompleteTimer.flush();
|
this.autocompleteTimer.flush();
|
||||||
}
|
}
|
||||||
util.dump("input", commandline.command, this.widgets.command[1]);
|
|
||||||
this.onChange(commandline.command);
|
this.onChange(commandline.command);
|
||||||
},
|
},
|
||||||
keyup: function onKeyUp(event) {
|
keyup: function onKeyUp(event) {
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ var ProcessorStack = Class("ProcessorStack", {
|
|||||||
|
|
||||||
process: function process(event) {
|
process: function process(event) {
|
||||||
function dbg() {}
|
function dbg() {}
|
||||||
|
let dbg = util.closure.dump;
|
||||||
|
|
||||||
let key = events.toString(event);
|
let key = events.toString(event);
|
||||||
this.events.push(event);
|
this.events.push(event);
|
||||||
@@ -90,21 +91,20 @@ var ProcessorStack = Class("ProcessorStack", {
|
|||||||
if (processors.length)
|
if (processors.length)
|
||||||
result = Events.KILL;
|
result = Events.KILL;
|
||||||
else if (this.actions.length) {
|
else if (this.actions.length) {
|
||||||
if (actions.length == 0)
|
if (actions.length == 0) {
|
||||||
dactyl.beep();
|
dactyl.beep();
|
||||||
|
events.feedingKeys = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (modes.replaying && !events.waitForPageLoad())
|
|
||||||
result = Events.KILL;
|
|
||||||
else {
|
|
||||||
for (var res = this.actions[0]; callable(res);)
|
for (var res = this.actions[0]; callable(res);)
|
||||||
res = res();
|
res = res();
|
||||||
result = res === Events.PASS ? Events.PASS : Events.KILL;
|
result = res === Events.PASS ? Events.PASS : Events.KILL;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if (result !== Events.KILL && !this.actions.length &&
|
else if (result !== Events.KILL && !this.actions.length &&
|
||||||
processors.some(function (p) !p.main.passUnknown)) {
|
processors.some(function (p) !p.main.passUnknown)) {
|
||||||
result = Events.KILL;
|
result = Events.KILL;
|
||||||
dactyl.beep();
|
dactyl.beep();
|
||||||
|
events.feedingKeys = false;
|
||||||
}
|
}
|
||||||
else if (result === undefined)
|
else if (result === undefined)
|
||||||
result = Events.PASS;
|
result = Events.PASS;
|
||||||
@@ -115,9 +115,11 @@ var ProcessorStack = Class("ProcessorStack", {
|
|||||||
if (result === Events.PASS || result === Events.ABORT)
|
if (result === Events.PASS || result === Events.ABORT)
|
||||||
this.events.filter(function (e) e.getPreventDefault())
|
this.events.filter(function (e) e.getPreventDefault())
|
||||||
.forEach(function (event, i) {
|
.forEach(function (event, i) {
|
||||||
|
let elem = event.originalTarget;
|
||||||
if (event.originalTarget) {
|
if (event.originalTarget) {
|
||||||
let evt = events.create(event.originalTarget.ownerDocument, event.type, event);
|
let doc = elem.ownerDocument || elem.document || elem;
|
||||||
events.dispatch(event.originalTarget, evt, { skipmap: true, isMacro: true });
|
let evt = events.create(doc, event.type, event);
|
||||||
|
events.dispatch(elem, evt, { skipmap: true, isMacro: true, isReplay: true });
|
||||||
}
|
}
|
||||||
else if (i > 0)
|
else if (i > 0)
|
||||||
events.events.keypress.call(events, event);
|
events.events.keypress.call(events, event);
|
||||||
@@ -491,6 +493,8 @@ var Events = Module("events", {
|
|||||||
util.threadYield(1, true);
|
util.threadYield(1, true);
|
||||||
|
|
||||||
for (let [, evt_obj] in Iterator(events.fromString(keys))) {
|
for (let [, evt_obj] in Iterator(events.fromString(keys))) {
|
||||||
|
let now = Date.now();
|
||||||
|
util.dump("+feed", events.toString(evt_obj));
|
||||||
for (let type in values(["keydown", "keyup", "keypress"])) {
|
for (let type in values(["keydown", "keyup", "keypress"])) {
|
||||||
let evt = update({}, evt_obj, { type: type });
|
let evt = update({}, evt_obj, { type: type });
|
||||||
|
|
||||||
@@ -508,13 +512,10 @@ var Events = Module("events", {
|
|||||||
else
|
else
|
||||||
events.events.keypress.call(events, event);
|
events.events.keypress.call(events, event);
|
||||||
}
|
}
|
||||||
|
util.dump("-feed", events.toString(evt_obj), this.feedingKeys);
|
||||||
|
|
||||||
if (!this.feedingKeys)
|
if (!this.feedingKeys)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Stop feeding keys if page loading failed.
|
|
||||||
if (modes.replaying && !this.waitForPageLoad())
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
@@ -594,9 +595,14 @@ var Events = Module("events", {
|
|||||||
* of x.
|
* of x.
|
||||||
*
|
*
|
||||||
* @param {string} keys Messy form.
|
* @param {string} keys Messy form.
|
||||||
|
* @param {boolean} unknownOk Whether unknown keys are passed
|
||||||
|
* through rather than being converted to <lt>keyname>.
|
||||||
|
* @default false
|
||||||
* @returns {string} Canonical form.
|
* @returns {string} Canonical form.
|
||||||
*/
|
*/
|
||||||
canonicalKeys: function (keys, unknownOk) {
|
canonicalKeys: function (keys, unknownOk) {
|
||||||
|
if (arguments.length === 1)
|
||||||
|
unknownOk = true;
|
||||||
return events.fromString(keys, unknownOk).map(events.closure.toString).join("");
|
return events.fromString(keys, unknownOk).map(events.closure.toString).join("");
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -1035,7 +1041,7 @@ var Events = Module("events", {
|
|||||||
if (!key)
|
if (!key)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
if (modes.recording && (!this._input || !mappings.user.hasMap(modes.main, this._input.buffer + key)))
|
if (modes.recording && !event.isReplay)
|
||||||
events._macroKeys.push(key);
|
events._macroKeys.push(key);
|
||||||
|
|
||||||
// feedingKeys needs to be separate from interrupted so
|
// feedingKeys needs to be separate from interrupted so
|
||||||
@@ -1043,8 +1049,6 @@ var Events = Module("events", {
|
|||||||
// interrupting whatever it's started and a real <C-c>
|
// interrupting whatever it's started and a real <C-c>
|
||||||
// interrupting our playback.
|
// interrupting our playback.
|
||||||
if (events.feedingKeys && !event.isMacro) {
|
if (events.feedingKeys && !event.isMacro) {
|
||||||
if (!event.originalTarget)
|
|
||||||
util.dumpStack();
|
|
||||||
if (key == "<C-c>") {
|
if (key == "<C-c>") {
|
||||||
events.feedingKeys = false;
|
events.feedingKeys = false;
|
||||||
if (modes.replaying) {
|
if (modes.replaying) {
|
||||||
@@ -1323,11 +1327,11 @@ var Events = Module("events", {
|
|||||||
},
|
},
|
||||||
mappings: function () {
|
mappings: function () {
|
||||||
mappings.add(modes.all,
|
mappings.add(modes.all,
|
||||||
["<C-z>"], "Temporarily ignore all " + config.appName + " key bindings",
|
["<C-z>", "<pass-all-keys>"], "Temporarily ignore all " + config.appName + " key bindings",
|
||||||
function () { modes.push(modes.PASS_THROUGH); });
|
function () { modes.push(modes.PASS_THROUGH); });
|
||||||
|
|
||||||
mappings.add(modes.all,
|
mappings.add(modes.all,
|
||||||
["<C-v>"], "Pass through next key",
|
["<C-v>", "<pass-next-key>"], "Pass through next key",
|
||||||
function () {
|
function () {
|
||||||
if (modes.main == modes.QUOTE)
|
if (modes.main == modes.QUOTE)
|
||||||
return Events.PASS;
|
return Events.PASS;
|
||||||
@@ -1340,7 +1344,7 @@ var Events = Module("events", {
|
|||||||
|
|
||||||
// macros
|
// macros
|
||||||
mappings.add([modes.NORMAL, modes.TEXT_AREA, modes.PLAYER].filter(util.identity),
|
mappings.add([modes.NORMAL, modes.TEXT_AREA, modes.PLAYER].filter(util.identity),
|
||||||
["q"], "Record a key sequence into a macro",
|
["q", "<record-macro>"], "Record a key sequence into a macro",
|
||||||
function ({ arg }) {
|
function ({ arg }) {
|
||||||
events._macroKeys.pop();
|
events._macroKeys.pop();
|
||||||
events[modes.recording ? "finishRecording" : "startRecording"](arg);
|
events[modes.recording ? "finishRecording" : "startRecording"](arg);
|
||||||
@@ -1348,13 +1352,34 @@ var Events = Module("events", {
|
|||||||
{ get arg() !modes.recording });
|
{ get arg() !modes.recording });
|
||||||
|
|
||||||
mappings.add([modes.NORMAL, modes.TEXT_AREA, modes.PLAYER].filter(util.identity),
|
mappings.add([modes.NORMAL, modes.TEXT_AREA, modes.PLAYER].filter(util.identity),
|
||||||
["@"], "Play a macro",
|
["@", "<play-macro>"], "Play a macro",
|
||||||
function ({ arg, count }) {
|
function ({ arg, count }) {
|
||||||
count = Math.max(count, 1);
|
count = Math.max(count, 1);
|
||||||
while (count-- && events.playMacro(arg))
|
while (count-- && events.playMacro(arg))
|
||||||
;
|
;
|
||||||
},
|
},
|
||||||
{ arg: true, count: true });
|
{ arg: true, count: true });
|
||||||
|
|
||||||
|
mappings.add([modes.COMMAND],
|
||||||
|
["<A-m>s", "<sleep>"], "Sleep for {count} milliseconds before continuing macro playback",
|
||||||
|
function ({ command, count }) {
|
||||||
|
let now = Date.now();
|
||||||
|
util.dump("+<sleep>", count);
|
||||||
|
dactyl.assert(count, "Count required for " + command);
|
||||||
|
if (events.feedingKeys)
|
||||||
|
util.sleep(count);
|
||||||
|
util.dump("-<sleep>", count, now - Date.now());
|
||||||
|
},
|
||||||
|
{ count: true });
|
||||||
|
|
||||||
|
mappings.add([modes.MAIN],
|
||||||
|
["<A-m>l", "<wait-for-page-load>"], "Wait for the current page to finish loading before continuing macro playback",
|
||||||
|
function () {
|
||||||
|
if (!events.waitForPageLoad()) {
|
||||||
|
util.interrupted = true;
|
||||||
|
throw Error("Interrupted");
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
options: function () {
|
options: function () {
|
||||||
options.add(["passkeys", "pk"],
|
options.add(["passkeys", "pk"],
|
||||||
|
|||||||
@@ -113,9 +113,17 @@ var Map = Class("Map", {
|
|||||||
if (this.executing)
|
if (this.executing)
|
||||||
util.dumpStack("Attempt to execute mapping recursively: " + args.command);
|
util.dumpStack("Attempt to execute mapping recursively: " + args.command);
|
||||||
dactyl.assert(!this.executing, "Attempt to execute mapping recursively: " + args.command);
|
dactyl.assert(!this.executing, "Attempt to execute mapping recursively: " + args.command);
|
||||||
|
|
||||||
|
try {
|
||||||
this.executing = true;
|
this.executing = true;
|
||||||
let res = dactyl.trapErrors(repeat);
|
var res = repeat();
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
events.feedingKeys = false;
|
||||||
|
}
|
||||||
|
finally {
|
||||||
this.executing = false;
|
this.executing = false;
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ want to bypass &dactyl.appName;'s key handling and pass keys directly to
|
|||||||
&dactyl.host; or to a web page, you have two options:
|
&dactyl.host; or to a web page, you have two options:
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags><![CDATA[pass-through <C-z> CTRL-Z]]></tags>
|
<tags><![CDATA[pass-through <pass-all-keys> <C-z> CTRL-Z]]></tags>
|
||||||
<spec><C-z></spec>
|
<spec><C-z></spec>
|
||||||
<description>
|
<description>
|
||||||
<p>
|
<p>
|
||||||
@@ -33,7 +33,7 @@ want to bypass &dactyl.appName;'s key handling and pass keys directly to
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags><![CDATA[send-key <C-v> CTRL-V]]></tags>
|
<tags><![CDATA[send-key <pass-next-key> <C-v> CTRL-V]]></tags>
|
||||||
<spec><C-v></spec>
|
<spec><C-v></spec>
|
||||||
<description>
|
<description>
|
||||||
<p>
|
<p>
|
||||||
@@ -171,7 +171,7 @@ want to bypass &dactyl.appName;'s key handling and pass keys directly to
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags><![CDATA[<MiddleMouse> p]]></tags>
|
<tags><![CDATA[<open-clipboard-url> <MiddleMouse> p]]></tags>
|
||||||
<strut/>
|
<strut/>
|
||||||
<spec>p</spec>
|
<spec>p</spec>
|
||||||
<description>
|
<description>
|
||||||
@@ -185,7 +185,7 @@ want to bypass &dactyl.appName;'s key handling and pass keys directly to
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags>P</tags>
|
<tags><tab-open-clipboard-url> P</tags>
|
||||||
<strut/>
|
<strut/>
|
||||||
<spec>P</spec>
|
<spec>P</spec>
|
||||||
<description>
|
<description>
|
||||||
@@ -343,7 +343,7 @@ want to bypass &dactyl.appName;'s key handling and pass keys directly to
|
|||||||
<h2 tag="reloading">Reloading</h2>
|
<h2 tag="reloading">Reloading</h2>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags>r</tags>
|
<tags><reload> r</tags>
|
||||||
<spec>r</spec>
|
<spec>r</spec>
|
||||||
<description short="true">
|
<description short="true">
|
||||||
<p>Reload the current web page.</p>
|
<p>Reload the current web page.</p>
|
||||||
@@ -351,7 +351,7 @@ want to bypass &dactyl.appName;'s key handling and pass keys directly to
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags>R</tags>
|
<tags><full-reload> R</tags>
|
||||||
<spec>R</spec>
|
<spec>R</spec>
|
||||||
<description short="true">
|
<description short="true">
|
||||||
<p>Reload the current web page without using the cache.</p>
|
<p>Reload the current web page without using the cache.</p>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<h2 tag="buffer-information">Buffer information</h2>
|
<h2 tag="buffer-information">Buffer information</h2>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags><![CDATA[<C-g>]]></tags>
|
<tags><![CDATA[<page-info> <C-g>]]></tags>
|
||||||
<strut/>
|
<strut/>
|
||||||
<spec><C-g></spec>
|
<spec><C-g></spec>
|
||||||
<description>
|
<description>
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags><![CDATA[g<C-g>]]></tags>
|
<tags><![CDATA[<more-page-info> g<C-g>]]></tags>
|
||||||
<spec>g<C-g></spec>
|
<spec>g<C-g></spec>
|
||||||
<description short="true">
|
<description short="true">
|
||||||
<p>Print file information. Same as <ex>:pa<oa>geinfo</oa></ex>.</p>
|
<p>Print file information. Same as <ex>:pa<oa>geinfo</oa></ex>.</p>
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
<h2 tag="motion scrolling">Motion commands</h2>
|
<h2 tag="motion scrolling">Motion commands</h2>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags>^ 0</tags>
|
<tags><scroll-begin> ^ 0</tags>
|
||||||
<strut/>
|
<strut/>
|
||||||
<spec>0</spec>
|
<spec>0</spec>
|
||||||
<description>
|
<description>
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags>$</tags>
|
<tags><scroll-end> $</tags>
|
||||||
<spec>$</spec>
|
<spec>$</spec>
|
||||||
<description short="true">
|
<description short="true">
|
||||||
<p>Scroll to the absolute right of the document</p>
|
<p>Scroll to the absolute right of the document</p>
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags>N%</tags>
|
<tags><scroll-percent> N%</tags>
|
||||||
<spec><a>count</a>%</spec>
|
<spec><a>count</a>%</spec>
|
||||||
<description short="true">
|
<description short="true">
|
||||||
<p>Scroll to <a>count</a> percent of the document.</p>
|
<p>Scroll to <a>count</a> percent of the document.</p>
|
||||||
@@ -148,7 +148,7 @@
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags><![CDATA[<Left> h]]></tags>
|
<tags><![CDATA[<scroll-column-left> <Left> h]]></tags>
|
||||||
<strut/>
|
<strut/>
|
||||||
<spec><oa>count</oa>h</spec>
|
<spec><oa>count</oa>h</spec>
|
||||||
<description>
|
<description>
|
||||||
@@ -160,7 +160,7 @@
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags><![CDATA[<C-e> <Down> j]]></tags>
|
<tags><![CDATA[<scroll-line-down> <C-e> <Down> j]]></tags>
|
||||||
<strut/>
|
<strut/>
|
||||||
<spec><oa>count</oa>j</spec>
|
<spec><oa>count</oa>j</spec>
|
||||||
<description>
|
<description>
|
||||||
@@ -172,7 +172,7 @@
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags><![CDATA[<C-y> <Up> k]]></tags>
|
<tags><![CDATA[<scroll-line-up> <C-y> <Up> k]]></tags>
|
||||||
<strut/>
|
<strut/>
|
||||||
<spec><oa>count</oa>k</spec>
|
<spec><oa>count</oa>k</spec>
|
||||||
<description>
|
<description>
|
||||||
@@ -184,7 +184,7 @@
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags><![CDATA[<Right> l]]></tags>
|
<tags><![CDATA[<scroll-column-right> <Right> l]]></tags>
|
||||||
<strut/>
|
<strut/>
|
||||||
<spec><oa>count</oa>l</spec>
|
<spec><oa>count</oa>l</spec>
|
||||||
<description>
|
<description>
|
||||||
@@ -196,7 +196,7 @@
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags><![CDATA[<C-d>]]></tags>
|
<tags><![CDATA[<scroll-down> <C-d>]]></tags>
|
||||||
<strut/>
|
<strut/>
|
||||||
<spec><oa>count</oa><C-d></spec>
|
<spec><oa>count</oa><C-d></spec>
|
||||||
<description>
|
<description>
|
||||||
@@ -209,7 +209,7 @@
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags><![CDATA[<C-u>]]></tags>
|
<tags><![CDATA[<scroll-up> <C-u>]]></tags>
|
||||||
<strut/>
|
<strut/>
|
||||||
<spec><oa>count</oa><C-u></spec>
|
<spec><oa>count</oa><C-u></spec>
|
||||||
<description>
|
<description>
|
||||||
@@ -222,7 +222,7 @@
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags><![CDATA[<S-Space> <PageUp> <C-b>]]></tags>
|
<tags><![CDATA[<scroll-page-up> <S-Space> <PageUp> <C-b>]]></tags>
|
||||||
<strut/>
|
<strut/>
|
||||||
<spec><oa>count</oa><C-b></spec>
|
<spec><oa>count</oa><C-b></spec>
|
||||||
<description>
|
<description>
|
||||||
@@ -234,7 +234,7 @@
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags><![CDATA[<Space> <PageDown> <C-f>]]></tags>
|
<tags><![CDATA[<scroll-page-down> <Space> <PageDown> <C-f>]]></tags>
|
||||||
<strut/>
|
<strut/>
|
||||||
<spec><oa>count</oa><C-f></spec>
|
<spec><oa>count</oa><C-f></spec>
|
||||||
<description>
|
<description>
|
||||||
@@ -264,7 +264,7 @@
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags>gi</tags>
|
<tags><focus-input> gi</tags>
|
||||||
<strut/>
|
<strut/>
|
||||||
<spec><oa>count</oa>gi</spec>
|
<spec><oa>count</oa>gi</spec>
|
||||||
<description>
|
<description>
|
||||||
@@ -277,7 +277,7 @@
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags>]f</tags>
|
<tags><next-frame> ]f</tags>
|
||||||
<strut/>
|
<strut/>
|
||||||
<spec><oa>count</oa>]f</spec>
|
<spec><oa>count</oa>]f</spec>
|
||||||
<description>
|
<description>
|
||||||
@@ -290,7 +290,7 @@
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags>[f</tags>
|
<tags><previous-frame> [f</tags>
|
||||||
<strut/>
|
<strut/>
|
||||||
<spec><oa>count</oa>[f</spec>
|
<spec><oa>count</oa>[f</spec>
|
||||||
<description>
|
<description>
|
||||||
@@ -303,7 +303,7 @@
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags>]]</tags>
|
<tags><next-page> ]]</tags>
|
||||||
<strut/>
|
<strut/>
|
||||||
<spec><oa>count</oa>]]</spec>
|
<spec><oa>count</oa>]]</spec>
|
||||||
<description>
|
<description>
|
||||||
@@ -316,7 +316,7 @@
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags>[[</tags>
|
<tags><previous-page> [[</tags>
|
||||||
<strut/>
|
<strut/>
|
||||||
<spec><oa>count</oa>[[</spec>
|
<spec><oa>count</oa>[[</spec>
|
||||||
<description>
|
<description>
|
||||||
@@ -361,7 +361,7 @@
|
|||||||
</note>
|
</note>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags>+ zi</tags>
|
<tags><![CDATA[<text-zoom-in> + zi]]></tags>
|
||||||
<spec><oa>count</oa>zi</spec>
|
<spec><oa>count</oa>zi</spec>
|
||||||
<description short="true">
|
<description short="true">
|
||||||
<p>Enlarge text zoom of current web page. Mnemonic: zoom in.</p>
|
<p>Enlarge text zoom of current web page. Mnemonic: zoom in.</p>
|
||||||
@@ -369,7 +369,7 @@
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags>zm</tags>
|
<tags><![CDATA[<text-zoom-more> zm]]></tags>
|
||||||
<strut/>
|
<strut/>
|
||||||
<spec><oa>count</oa>zm</spec>
|
<spec><oa>count</oa>zm</spec>
|
||||||
<description>
|
<description>
|
||||||
@@ -378,7 +378,7 @@
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags>- zo</tags>
|
<tags><![CDATA[<text-zoom-out> - zo]]></tags>
|
||||||
<spec><oa>count</oa>zo</spec>
|
<spec><oa>count</oa>zo</spec>
|
||||||
<description short="true">
|
<description short="true">
|
||||||
<p>Reduce text zoom of current web page. Mnemonic: zoom out.</p>
|
<p>Reduce text zoom of current web page. Mnemonic: zoom out.</p>
|
||||||
@@ -386,7 +386,7 @@
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags>zr</tags>
|
<tags><![CDATA[<text-zoom-reduce> zr]]></tags>
|
||||||
<spec><oa>count</oa>zr</spec>
|
<spec><oa>count</oa>zr</spec>
|
||||||
<description short="true">
|
<description short="true">
|
||||||
<p>Reduce text zoom of current web page by a larger amount. Mnemonic: zoom reduce.</p>
|
<p>Reduce text zoom of current web page by a larger amount. Mnemonic: zoom reduce.</p>
|
||||||
@@ -394,7 +394,7 @@
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags>zz</tags>
|
<tags><![CDATA[<text-zoom> zz]]></tags>
|
||||||
<strut/>
|
<strut/>
|
||||||
<spec><oa>count</oa>zz</spec>
|
<spec><oa>count</oa>zz</spec>
|
||||||
<description>
|
<description>
|
||||||
@@ -407,7 +407,7 @@
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags>ZI zI</tags>
|
<tags><![CDATA[<full-zoom-in> ZI zI]]></tags>
|
||||||
<spec><oa>count</oa>ZI</spec>
|
<spec><oa>count</oa>ZI</spec>
|
||||||
<description short="true">
|
<description short="true">
|
||||||
<p>Enlarge full zoom of current web page. Mnemonic: zoom in.</p>
|
<p>Enlarge full zoom of current web page. Mnemonic: zoom in.</p>
|
||||||
@@ -415,7 +415,7 @@
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags>ZM zM</tags>
|
<tags><![CDATA[<full-zoom-more> ZM zM]]></tags>
|
||||||
<strut/>
|
<strut/>
|
||||||
<spec><oa>count</oa>ZM</spec>
|
<spec><oa>count</oa>ZM</spec>
|
||||||
<description>
|
<description>
|
||||||
@@ -424,7 +424,7 @@
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags>ZO zO</tags>
|
<tags><![CDATA[<full-zoom-out> ZO zO]]></tags>
|
||||||
<spec><oa>count</oa>ZO</spec>
|
<spec><oa>count</oa>ZO</spec>
|
||||||
<description short="true">
|
<description short="true">
|
||||||
<p>Reduce full zoom of current web page. Mnemonic: zoom out.</p>
|
<p>Reduce full zoom of current web page. Mnemonic: zoom out.</p>
|
||||||
@@ -432,7 +432,7 @@
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags>ZR zR</tags>
|
<tags><![CDATA[<full-zoom-reduce> ZR zR]]></tags>
|
||||||
<spec><oa>count</oa>ZR</spec>
|
<spec><oa>count</oa>ZR</spec>
|
||||||
<description short="true">
|
<description short="true">
|
||||||
<p>Reduce full zoom of current web page by a larger amount. Mnemonic: zoom reduce.</p>
|
<p>Reduce full zoom of current web page by a larger amount. Mnemonic: zoom reduce.</p>
|
||||||
@@ -440,7 +440,7 @@
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags>zZ</tags>
|
<tags><![CDATA[<full-zoom> zZ]]></tags>
|
||||||
<strut/>
|
<strut/>
|
||||||
<spec><oa>count</oa>zZ</spec>
|
<spec><oa>count</oa>zZ</spec>
|
||||||
<description>
|
<description>
|
||||||
@@ -489,7 +489,7 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags>y</tags>
|
<tags><yank-location> y</tags>
|
||||||
<spec>y</spec>
|
<spec>y</spec>
|
||||||
<description short="true">
|
<description short="true">
|
||||||
<p>Yank current location to the clipboard.</p>
|
<p>Yank current location to the clipboard.</p>
|
||||||
@@ -497,7 +497,7 @@
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags>Y</tags>
|
<tags><yank-word> Y</tags>
|
||||||
<spec>Y</spec>
|
<spec>Y</spec>
|
||||||
<description short="true">
|
<description short="true">
|
||||||
<p>Copy currently selected text to the system clipboard.</p>
|
<p>Copy currently selected text to the system clipboard.</p>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<h2 tag="single-repeat">Single repeats</h2>
|
<h2 tag="single-repeat">Single repeats</h2>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags>.</tags>
|
<tags><repeat-key> .</tags>
|
||||||
<strut/>
|
<strut/>
|
||||||
<spec><oa>count</oa>.</spec>
|
<spec><oa>count</oa>.</spec>
|
||||||
<description>
|
<description>
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
<h2 tag="macros complex-repeat">Macros</h2>
|
<h2 tag="macros complex-repeat">Macros</h2>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags>q</tags>
|
<tags><record-macro> q</tags>
|
||||||
<strut/>
|
<strut/>
|
||||||
<spec>q<a>0-9a-zA-Z</a></spec>
|
<spec>q<a>0-9a-zA-Z</a></spec>
|
||||||
<description>
|
<description>
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<tags>@</tags>
|
<tags><play-macro> @</tags>
|
||||||
<spec><oa>count</oa>@<a>a-z0-9</a></spec>
|
<spec><oa>count</oa>@<a>a-z0-9</a></spec>
|
||||||
<description>
|
<description>
|
||||||
<p>
|
<p>
|
||||||
@@ -100,6 +100,38 @@
|
|||||||
</description>
|
</description>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
|
<h2 tag="macro-utilities">Macro utilities</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The following key bindings facilitate the recording of efficient
|
||||||
|
macros. They have no effect when typed normally, but are
|
||||||
|
recorded and take effect during macro playback.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<tags><sleep> <A-m>s</tags>
|
||||||
|
<strut/>
|
||||||
|
<spec><a>count</a><m>s</spec>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
Sleep for <a>count</a> milliseconds before resuming playback.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<tags><![CDATA[<wait-for-page-load> <A-m>l]]></tags>
|
||||||
|
<strut/>
|
||||||
|
<spec><![CDATA[<A-m>l]]></spec>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
Wait for the current page to finish loading before resuming
|
||||||
|
playback.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
|
||||||
<h2 tag="using-scripts">Using scripts</h2>
|
<h2 tag="using-scripts">Using scripts</h2>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
|
|||||||
@@ -66,6 +66,8 @@
|
|||||||
and linking to source code locations).
|
and linking to source code locations).
|
||||||
- :downloads now opens a download list in the multi-line output
|
- :downloads now opens a download list in the multi-line output
|
||||||
buffer.
|
buffer.
|
||||||
|
- Added :mapgroup command and -group flag to :map, :unmap, and
|
||||||
|
:mapclear.
|
||||||
- :extensions has been replaced with a more powerful :addons.
|
- :extensions has been replaced with a more powerful :addons.
|
||||||
- Added :cookies command.
|
- Added :cookies command.
|
||||||
- :extadd now supports remote URLs as well as local files on Firefox 4.
|
- :extadd now supports remote URLs as well as local files on Firefox 4.
|
||||||
@@ -91,6 +93,14 @@
|
|||||||
- :command now accepts comma-separated alternative command names.
|
- :command now accepts comma-separated alternative command names.
|
||||||
- :command -complete custom now also accepts a completions array, see
|
- :command -complete custom now also accepts a completions array, see
|
||||||
:h :command-completion-custom.
|
:h :command-completion-custom.
|
||||||
|
* Mapping changes:
|
||||||
|
- Added site-specific mapping groups and related command
|
||||||
|
changes.
|
||||||
|
- Added named aliases for many mappings
|
||||||
|
- Added <A-m>l and <A-m>s to aid in the construction of macros.
|
||||||
|
- Removed the implicit page load delays during macro playback.
|
||||||
|
- Added the base modes Base, Main, and Command which other
|
||||||
|
modes inherit key bindings from.
|
||||||
* Improvements to :style and :highlight:
|
* Improvements to :style and :highlight:
|
||||||
- Added -agent flag to :style.
|
- Added -agent flag to :style.
|
||||||
- The -append flag now updates existing properties rather than
|
- The -append flag now updates existing properties rather than
|
||||||
|
|||||||
Reference in New Issue
Block a user