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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user