From 80edf526d39b1c2c90fb1f76db2708d81db9ad47 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 17 Nov 2015 21:29:25 +0100 Subject: Update keysnail.js --- keysnail/.keysnail.js | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) (limited to 'keysnail') diff --git a/keysnail/.keysnail.js b/keysnail/.keysnail.js index 764b39d..9799e2e 100644 --- a/keysnail/.keysnail.js +++ b/keysnail/.keysnail.js @@ -1,15 +1,21 @@ -// ========================== KeySnail Init File =========================== // -/*global key plugins hook command util*/ -// You can preserve your code in this area when generating the init file using GUI. -// Put all your code except special key, set*key, hook, blacklist. -// ========================================================================= // +// ======================= KeySnail Init File ======================== // +/*global key plugins hook command util gBrowser _content goDoCommand + * KeySnail KeyEvent userscript ext openHelpLink + * BrowserCloseTabOrWindow closeWindow undoCloseTab OpenBrowserWindow + * getBrowser goQuitApplication saveDocument toJavaScriptConsole + * display shell BrowserReload BrowserBack BrowserForward content*/ +// You can preserve your code in this area when generating the init +// file using GUI. Put all your code except special key, set*key, +// hook, blacklist. +// =================================================================== // //{{%PRESERVE% // Put your codes here plugins.options["hok.hint_keys"] = "arstdhneio"; +plugins.options['bmany.default_open_type'] = 'tab'; //}}%PRESERVE% -// ========================================================================= // +// =================================================================== // -// ========================= Special key settings ========================== // +// ====================== Special key settings ======================= // key.quitKey = "C-g"; key.helpKey = ""; @@ -22,7 +28,7 @@ key.negativeArgument1Key = "C--"; key.negativeArgument2Key = "C-M--"; key.negativeArgument3Key = "M--"; -// ================================= Hooks ================================= // +// ============================== Hooks ============================== // hook.addToHook('KeyBoardQuit', function (aEvent) { if (key.currentKeySequence.length) @@ -57,7 +63,7 @@ hook.addToHook('KeyBoardQuit', function (aEvent) { } }); -// ============================= Key bindings ============================== // +// ========================== Key bindings =========================== // key.setGlobalKey('C-M-r', function (ev) { userscript.reload(); @@ -362,7 +368,7 @@ key.setViewKey('h', function (ev) { getBrowser().mTabContainer.advanceSelectedTab(-1, true); }, 'Select previous tab', false); -key.setViewKey(':', function (ev, arg) { +key.setViewKey('x', function (ev, arg) { shell.input(null, arg); }, 'List and execute commands', true); @@ -519,3 +525,19 @@ key.setCaretKey(["C-x", "h"], function (ev) { key.setCaretKey('f', function (ev) { command.focusElement(command.elementsRetrieverTextarea, 0); }, 'Focus to the first textarea', true); + +key.setViewKey([':', 'b'], function (ev, arg) { + ext.exec("bmany-list-all-bookmarks", arg, ev); +}, 'bmany - List all bookmarks'); + +key.setViewKey([':', 'B'], function (ev, arg) { + ext.exec("bmany-list-bookmarklets", arg, ev); +}, "bmany - List all bookmarklets"); + +key.setViewKey([':', 'k'], function (ev, arg) { + ext.exec("bmany-list-bookmarks-with-keyword", arg, ev); +}, "bmany - List bookmarks with keyword"); + +key.setViewKey([':', 't'], function (ev, arg) { + ext.exec("bmany-list-bookmarks-with-tag", arg, ev); +}, "bmany - List bookmarks with tag"); -- cgit v1.2.3-54-g00ecf