1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 18:42:27 +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

1
NEWS
View File

@@ -1,6 +1,7 @@
<pre> <pre>
2008-06-xx: 2008-06-xx:
* version 1.2 * version 1.2
* don't pass any ctrl- or alt- prefixed keys to firefox in insert mode
* keywords in :open <arg> have higher priority than local files now * keywords in :open <arg> have higher priority than local files now
2008-06-03: 2008-06-03:

View File

@@ -53,7 +53,7 @@ liberator.Bookmarks = function () //{{{
function load() function load()
{ {
// update our bookmark cache // update our bookmark cache
bookmarks = []; // also clear our bookmark cache bookmarks = [];
keywords = []; keywords = [];
var folders = [bookmarksService.toolbarFolder, bookmarksService.bookmarksMenuFolder, bookmarksService.unfiledBookmarksFolder]; var folders = [bookmarksService.toolbarFolder, bookmarksService.bookmarksMenuFolder, bookmarksService.unfiledBookmarksFolder];

View File

@@ -1311,13 +1311,18 @@ liberator.Events = function () //{{{
// allow key to be passed to firefox if we can't handle it // allow key to be passed to firefox if we can't handle it
stop = false; 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)) 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();
} }
} }