1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-24 06:25:46 +01:00

show info about tabs loaded in background; also allow ctrl- prefixed keys again

This commit is contained in:
Martin Stubenschrott
2008-06-24 20:36:06 +00:00
parent 89bbff60fd
commit 7aa055d9d3
7 changed files with 30 additions and 26 deletions

View File

@@ -226,11 +226,10 @@ liberator.Editor = function () //{{{
addMotionMap("y"); // yank
// insert mode mappings
liberator.mappings.add([liberator.modes.INSERT],
["<C-Left>", "<C-Right>", "<C-Home>", "<C-End>", "<C-S-Home>", "<C-S-End>", "<C-BS"],
"Keys are passed to " + liberator.config.hostApplication,
function () { return true; },
{ flags: liberator.Mappings.flags.ALLOW_EVENT_ROUTING });
liberator.mappings.add(modes,
["<C-o>", "<C-i>", "<C-f>", "<C-g>", "<C-n>"],
"Ignore certain " + liberator.config.hostApplication + " key bindings",
function () { /*liberator.beep();*/ });
liberator.mappings.add(modes,
["<C-w>"], "Delete previous word",

View File

@@ -475,6 +475,10 @@ liberator.Events = function () //{{{
}, 100);
}
}
else // background tab
{
liberator.commandline.echo("Background tab loaded: " + doc.title || doc.location.href, liberator.commandline.HL_INFOMSG);
}
}
}
@@ -1208,7 +1212,7 @@ liberator.Events = function () //{{{
event.stopPropagation();
return false;
}
// if Hit-a-hint mode is on, special handling of keys is required
// if Hint mode is on, special handling of keys is required
if (liberator.mode == liberator.modes.HINTS)
{
liberator.hints.onEvent(event);
@@ -1236,7 +1240,6 @@ liberator.Events = function () //{{{
else
map = liberator.mappings.get(liberator.mode, candidateCommand);
// counts must be at the start of a complete mapping (10j -> go 10 lines down)
if (/^[1-9][0-9]*$/.test(liberator.input.buffer + key))
{
@@ -1338,14 +1341,7 @@ liberator.Events = function () //{{{
// allow key to be passed to firefox if we can't handle it
stop = false;
// allow ctrl- or alt- prefixed keys only in NORMAL mode, as it is annoying
// if you press ctrl-o in a textarea and the file->open dialog pops up
if (liberator.mode != liberator.modes.NORMAL && (event.ctrlKey || event.metaKey || event.altKey))
{
stop = true;
liberator.beep();
}
else if (liberator.mode == liberator.modes.COMMAND_LINE)
if (liberator.mode == liberator.modes.COMMAND_LINE)
{
if (!(liberator.modes.extended & liberator.modes.INPUT_MULTILINE))
liberator.commandline.onEvent(event); // reroute event in command line mode

View File

@@ -401,12 +401,13 @@ liberator.CommandLine = function () //{{{
return {
HL_NORMAL : "hl-Normal",
HL_ERRORMSG: "hl-ErrorMsg",
HL_MODEMSG : "hl-ModeMsg",
HL_MOREMSG : "hl-MoreMsg",
HL_QUESTION: "hl-Question",
HL_WARNING : "hl-Warning",
HL_NORMAL : "hl-Normal",
HL_ERRORMSG : "hl-ErrorMsg",
HL_MODEMSG : "hl-ModeMsg",
HL_MOREMSG : "hl-MoreMsg",
HL_QUESTION : "hl-Question",
HL_INFOMSG : "hl-InfoMsg",
HL_WARNING : "hl-Warning",
// not yet used
FORCE_MULTILINE : 1 << 0,