Created
March 31, 2011 01:44
-
-
Save hyagni/895673 to your computer and use it in GitHub Desktop.
By hooking KeyBoardQuit on keysnail, disable caret browse mode and hide panorama with C-g. C-g means that I want to back to normal browsing.
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
hook.setHook('KeyBoardQuit', function (aEvent) { | |
if (key.currentKeySequence.length) { | |
return; | |
} | |
command.closeFindBar(); | |
var marked = command.marked(aEvent); | |
if (util.isCaretEnabled()) { | |
if (marked) { | |
command.resetMark(aEvent); | |
} else { | |
if ("blur" in aEvent.target) { | |
aEvent.target.blur(); | |
} | |
gBrowser.focus(); | |
_content.focus(); | |
} | |
util.setBoolPref("accessibility.browsewithcaret", false); | |
} else { | |
TabView.hide(); | |
goDoCommand("cmd_selectNone"); | |
} | |
if (KeySnail.windowType === "navigator:browser" && !marked) { | |
key.generateKey(aEvent.originalTarget, KeyEvent.DOM_VK_ESCAPE, true); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment