Created
August 17, 2009 14:29
-
-
Save mooz/169146 to your computer and use it in GitHub Desktop.
This file contains 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"); | |
// ==================== view mode ==================== // | |
key.setViewKey([["g"], | |
["M-<"]], | |
function () { goDoCommand('cmd_scrollTop'); }, | |
"Scroll to the top of the page"); | |
key.setViewKey([["G"], | |
["M->"]], | |
function () { goDoCommand('cmd_scrollBottom'); }, | |
"Scroll to the bottom of the page"); | |
// ==================== edit mode ==================== // | |
key.setEditKey([["C-SPC"], | |
["C-@"]], | |
function (aEvent) { command.setMark(aEvent); }, | |
"Set the mark"); | |
// ==================== caret mode ==================== // | |
key.setCaretKey("J", function () { | |
util.getSelectionController().scrollLine(true); | |
}, "Scroll line down"); | |
key.setCaretKey("K", function () { | |
util.getSelectionController().scrollLine(false); | |
}, "Scroll line up"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment