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

don't send ctrl-keys to firefox in insert mode

This commit is contained in:
Martin Stubenschrott
2008-06-06 12:54:10 +00:00
parent f85e07c315
commit ab9a6811bd
3 changed files with 11 additions and 5 deletions

View File

@@ -1311,13 +1311,18 @@ liberator.Events = function () //{{{
// allow key to be passed to firefox if we can't handle it
stop = false;
if (liberator.mode == liberator.modes.COMMAND_LINE)
// 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.modes.extended & liberator.modes.INPUT_MULTILINE))
stop = !liberator.commandline.onEvent(event); // reroute event in command line mode
liberator.commandline.onEvent(event); // reroute event in command line mode
}
else if (liberator.mode != liberator.modes.INSERT)
liberator.beep();
}
}