Browse Source

bind C on linksnail

pull/1/head
10sr 12 years ago
parent
commit
0a05f4ed35
1 changed files with 8 additions and 17 deletions
  1. +8
    -17
      .keysnail.js

+ 8
- 17
.keysnail.js View File

@@ -567,11 +567,9 @@ hook.setHook('KeySnailInitialized', function () {


hook.setHook('KeyBoardQuit', function (aEvent) { hook.setHook('KeyBoardQuit', function (aEvent) {
ext.exec("hide-sidebar"); ext.exec("hide-sidebar");

let(elem = document.commandDispatcher.focusedElement) elem && elem.blur(); let(elem = document.commandDispatcher.focusedElement) elem && elem.blur();
gBrowser.focus(); gBrowser.focus();
content.focus(); content.focus();

command.closeFindBar(); command.closeFindBar();
if (util.isCaretEnabled()) { if (util.isCaretEnabled()) {
command.resetMark(aEvent); command.resetMark(aEvent);
@@ -580,8 +578,7 @@ hook.setHook('KeyBoardQuit', function (aEvent) {
} }
key.generateKey(aEvent.originalTarget, KeyEvent.DOM_VK_ESCAPE, true); key.generateKey(aEvent.originalTarget, KeyEvent.DOM_VK_ESCAPE, true);
}); });
hook.addToHook('KeyBoardQuit', function (aEvent) {
});
hook.addToHook('KeyBoardQuit', function (aEvent) {});


hook.setHook('Unload', function () { hook.setHook('Unload', function () {
util.getBrowserWindows().some(function (win) { util.getBrowserWindows().some(function (win) {
@@ -628,12 +625,6 @@ key.setGlobalKey('M-:', function (ev) {
command.interpreter(); command.interpreter();
}, 'JavaScript のコードを評価'); }, 'JavaScript のコードを評価');


key.setViewKey('', function (ev, arg) {
var n = gBrowser.mCurrentTab._tPos;
BrowserCloseTabOrWindow();
gBrowser.selectedTab = gBrowser.mTabs[n];
}, '閉じて次のタブ');

key.setViewKey('x', function (aEvent, aArg) { key.setViewKey('x', function (aEvent, aArg) {
ext.select(aArg, aEvent); ext.select(aArg, aEvent);
}, 'エクステ一覧'); }, 'エクステ一覧');
@@ -760,10 +751,6 @@ key.setViewKey('a', function (ev, arg) {
allTabs.open(); allTabs.open();
}, 'alltabs.open'); }, 'alltabs.open');


key.setViewKey('C', function (ev, arg) {
ext.exec("copy-url", arg, ev);
}, '選択タブと現在のタブを閉じる', true);

key.setViewKey('I', function (ev, arg) { key.setViewKey('I', function (ev, arg) {
ext.exec("instapaper-add-this-page-and-close", arg, ev); ext.exec("instapaper-add-this-page-and-close", arg, ev);
}, 'instapaper add page', true); }, 'instapaper add page', true);
@@ -793,10 +780,14 @@ key.setViewKey('l', function (ev) {
command.focusToById("urlbar"); command.focusToById("urlbar");
}, 'ロケーションバーへフォーカス', true); }, 'ロケーションバーへフォーカス', true);


key.setViewKey('0', function (ev) {
BrowserCloseTabOrWindow();
}, 'タブ / ウィンドウを閉じる');

key.setEditKey('C-<tab>', function (ev) { key.setEditKey('C-<tab>', function (ev) {
command.walkInputElement(command.elementsRetrieverTextarea, true, true); command.walkInputElement(command.elementsRetrieverTextarea, true, true);
}, '次のテキストエリアへフォーカス'); }, '次のテキストエリアへフォーカス');


key.setViewKey('0', function (ev) {
BrowserCloseTabOrWindow();
}, 'タブ / ウィンドウを閉じる');
key.setViewKey('C', function (ev, arg) {
ext.exec('linksnail', arg, ev);
}, 'LinkSnail', true);

Loading…
Cancel
Save