1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 19:32:27 +01:00

And xulmus was born.

This commit is contained in:
Doug Kearns
2009-03-16 15:54:02 +11:00
parent 9f70457a4a
commit 80beaa41df
61 changed files with 7085 additions and 36 deletions

View File

@@ -628,7 +628,7 @@ function Events() //{{{
// return true when load successful, or false otherwise
function waitForPageLoaded() events.waitForPageLoad();
// load all macros inside ~/.vimperator/macros/
// load all macros inside ~/.xulmus/macros/
// setTimeout needed since io. is loaded after events.
setTimeout(function () {
try
@@ -678,16 +678,16 @@ function Events() //{{{
function () { events.onEscape(); });
// add the ":" mapping in all but insert mode mappings
mappings.add([modes.NORMAL, modes.VISUAL, modes.HINTS, modes.MESSAGE, modes.COMPOSE, modes.CARET, modes.TEXTAREA],
mappings.add([modes.NORMAL, modes.PLAYER, modes.VISUAL, modes.HINTS, modes.MESSAGE, modes.COMPOSE, modes.CARET, modes.TEXTAREA],
[":"], "Enter command line mode",
function () { commandline.open(":", "", modes.EX); });
// focus events
mappings.add([modes.NORMAL, modes.VISUAL, modes.CARET],
mappings.add([modes.NORMAL, modes.PLAYER, modes.VISUAL, modes.CARET],
["<Tab>"], "Advance keyboard focus",
function () { document.commandDispatcher.advanceFocus(); });
mappings.add([modes.NORMAL, modes.VISUAL, modes.CARET, modes.INSERT, modes.TEXTAREA],
mappings.add([modes.NORMAL, modes.PLAYER,modes.VISUAL, modes.CARET, modes.INSERT, modes.TEXTAREA],
["<S-Tab>"], "Rewind keyboard focus",
function () { document.commandDispatcher.rewindFocus(); });
@@ -704,12 +704,12 @@ function Events() //{{{
function () { return; });
// macros
mappings.add([modes.NORMAL, modes.MESSAGE],
mappings.add([modes.NORMAL, modes.PLAYER, modes.MESSAGE],
["q"], "Record a key sequence into a macro",
function (arg) { events.startRecording(arg); },
{ flags: Mappings.flags.ARGUMENT });
mappings.add([modes.NORMAL, modes.MESSAGE],
mappings.add([modes.NORMAL, modes.PLAYER, modes.MESSAGE],
["@"], "Play a macro",
function (count, arg)
{
@@ -1037,8 +1037,8 @@ function Events() //{{{
// (i.e., cntrl codes 27--31)
// ---
// For more information, see:
// [*] Vimp FAQ: http://vimperator.org/trac/wiki/Vimperator/FAQ#WhydoesntC-workforEscMacOSX
// [*] Referenced mailing list msg: http://www.mozdev.org/pipermail/vimperator/2008-May/001548.html
// [*] Vimp FAQ: http://xulmus.org/trac/wiki/Xulmus/FAQ#WhydoesntC-workforEscMacOSX
// [*] Referenced mailing list msg: http://www.mozdev.org/pipermail/xulmus/2008-May/001548.html
// [*] Mozilla bug 416227: event.charCode in keypress handler has unexpected values on Mac for Ctrl with chars in "[ ] _ \"
// https://bugzilla.mozilla.org/show_bug.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&id=416227
// [*] Mozilla bug 432951: Ctrl+'foo' doesn't seem same charCode as Meta+'foo' on Cocoa
@@ -1226,6 +1226,21 @@ function Events() //{{{
}
}
if(config.name == "Xulmus")
{
// Switch to -- PLAYER -- mode for Songbird Media Player.
if(config.isPlayerWindow)
{
liberator.mode = modes.PLAYER;
}
else
{
liberator.mode = modes.NORMAL;
}
return;
}
urlbar = document.getElementById("urlbar");
if (elem == null && urlbar && urlbar.inputField == lastFocus)
liberator.threadYield(true);
@@ -1421,8 +1436,8 @@ function Events() //{{{
// XXX: ugly hack for now pass certain keys to Firefox as they are without beeping
// also fixes key navigation in combo boxes, submitting forms, etc.
// FIXME: breaks iabbr for now --mst
if ((config.name == "Vimperator" && liberator.mode == modes.NORMAL)
|| liberator.mode == modes.INSERT)
if (((config.name == "Xulmus" || config.name == "Vimperator") && liberator.mode == modes.NORMAL || liberator.mode == modes.INSERT))
{
if (key == "<Return>")
return false;