mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-23 04:13:32 +01:00
Add some mappings to AUTOCOMPLETE mode.
This commit is contained in:
@@ -839,6 +839,27 @@ var Editor = Module("editor", {
|
|||||||
modes.pop(modes.TEXT_EDIT);
|
modes.pop(modes.TEXT_EDIT);
|
||||||
},
|
},
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
|
function bind() mappings.add.apply(mappings,
|
||||||
|
[[modes.AUTOCOMPLETE]].concat(Array.slice(arguments)))
|
||||||
|
|
||||||
|
bind(["<Esc>"], "Return to INSERT mode",
|
||||||
|
function () Events.PASS);
|
||||||
|
|
||||||
|
bind(["<Up>"], "Select the next autocompletion result",
|
||||||
|
function () Events.PASS);
|
||||||
|
|
||||||
|
bind(["<Down>"], "Select the next autocompletion result",
|
||||||
|
function () Events.PASS);
|
||||||
|
|
||||||
|
bind(["<C-[>"], "Return to INSERT mode",
|
||||||
|
function () { events.feedkeys("<Esc>", { skipmap: true }); });
|
||||||
|
|
||||||
|
bind(["<C-n>"], "Select the next autocompletion result",
|
||||||
|
function () { events.feedkeys("<Down>", { skipmap: true }); });
|
||||||
|
|
||||||
|
bind(["<C-p>"], "Select the next previous result",
|
||||||
|
function () { events.feedkeys("<Up>", { skipmap: true }); });
|
||||||
},
|
},
|
||||||
|
|
||||||
options: function () {
|
options: function () {
|
||||||
|
|||||||
@@ -894,9 +894,9 @@ var Events = Module("events", {
|
|||||||
// For more information, see:
|
// For more information, see:
|
||||||
// [*] Referenced mailing list msg: http://www.mozdev.org/pipermail/pentadactyl/2008-May/001548.html
|
// [*] Referenced mailing list msg: http://www.mozdev.org/pipermail/pentadactyl/2008-May/001548.html
|
||||||
// [*] Mozilla bug 416227: event.charCode in keypress handler has unexpected values on Mac for Ctrl with chars in "[ ] _ \"
|
// [*] Mozilla bug 416227: event.charCode in keypress handler has unexpected values on Mac for Ctrl with chars in "[ ] _ \"
|
||||||
// https://bugzilla.mozilla.org/show_bug.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&id=416227
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=416227
|
||||||
// [*] Mozilla bug 432951: Ctrl+'foo' doesn't seem same charCode as Meta+'foo' on Cocoa
|
// [*] Mozilla bug 432951: Ctrl+'foo' doesn't seem same charCode as Meta+'foo' on Cocoa
|
||||||
// https://bugzilla.mozilla.org/show_bug.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&id=432951
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=432951
|
||||||
// ---
|
// ---
|
||||||
//
|
//
|
||||||
// The following fixes are only activated if util.OS.isMacOSX.
|
// The following fixes are only activated if util.OS.isMacOSX.
|
||||||
|
|||||||
Reference in New Issue
Block a user