This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==================== set global keys ==================== // | |
| key.setGlobalKey("C-M-r", | |
| function () { userscript.reload(); }, | |
| "設定ファイルを再読み込み"); | |
| // -------------------- help command -------------------- // | |
| key.setGlobalKey([key.helpKey, "b"], function () { | |
| key.listKeyBindings(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| key.setGlobalKey(["C-c", "C-w", "C-a"], | |
| function () { | |
| window.alert("Hello!"); | |
| }, | |
| "Hello Dialog"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| key.setGlobalKey(["C-c", "C-w", "C-a"], | |
| function (event, arg) { | |
| window.alert("Hello! Prefix argument is " + arg); | |
| }, | |
| "Hello Dialog"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| key.setGlobalKey(["C-c", "C-w", "C-a"], | |
| function (event, arg) { | |
| window.alert("Hello! Prefix argument is " + arg); | |
| }, | |
| "Hello Dialog", | |
| true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| key.setViewKey("g", | |
| function () { goDoCommand('cmd_scrollTop'); }, | |
| "ページ先頭へ移動"); | |
| key.setViewKey("M-<", | |
| function () { goDoCommand('cmd_scrollTop'); }, | |
| "ページ先頭へ移動"); | |
| key.setViewKey(["ESC", "<"], | |
| function () { goDoCommand('cmd_scrollTop'); }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| key.setViewKey([["g"], | |
| ["M-<"], | |
| ["ESC", "<"]], | |
| function () { goDoCommand('cmd_scrollTop'); }, | |
| "ページ先頭へ移動"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| key.helpKey = "<tab>"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| key.isControlKey = function (aEvent) { | |
| return aEvent.ctrlKey; | |
| }; | |
| key.isMetaKey = function (aEvent) { | |
| return aEvent.altKey || aEvent.commandKey; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| key.isControlKey = function (aEvent) { | |
| return aEvent.ctrlKey | |
| || aEvent.keyCode == KeyEvent.DOM_VK_CAPS_LOCK; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==================== global mode ==================== // | |
| key.setGlobalKey(["C-x", "k"], | |
| function () { BrowserCloseTabOrWindow(); }, | |
| "Close tab / window"); | |
| key.setGlobalKey(["C-x", "K"], | |
| function () { closeWindow(true); }, | |
| "Close the window"); |
OlderNewer