define_keymaps_page_mode: new kind of page-mode
[conkeror.git] / modules / page-modes / gmane.js
blob08060da476f0721efb5a02865f70b2dde84cbe7d
1 /**
2  * (C) Copyright 2008 David Kettler
3  * (C) Copyright 2009-2010 John J. Foerch
4  *
5  * Use, modification, and distribution are subject to the terms specified in the
6  * COPYING file.
7 **/
9 in_module(null);
11 require("content-buffer.js");
13 define_keymap("gmane_keymap", $display_name = "gmane");
16   Loom keystrokes.  http://gmane.org/loom-help.php
18   SPC   Page down, then next article
19   DEL   Page up the current article
20   n     Select the next unread article
21   p     Select the previous unread article
22   N     Select the next article
23   P     Select the previous article
24   +     Go to the next page
25   -     Go to the previous page
26   f     Go to the first page
27   l     Go to the last page
28   c     Catch up -- mark all articles as read
29   C     Clear -- mark all articles as unread
30   R     Refresh the group
31   <     Go to the first article on the page
32   >     Go to the last article on the page
33   .     Go to the first article currently displayed in the frame
34   down  Move focus to the next subject
35   up    Move focus to the previous subject
36 * q     Quit and go to the list of groups
37   S     Report the current article as spam
38 * D     Disable all Loom keystrokes
40   Keystrokes marked with * are not passed through in this mode.
42   There's a disable, but no enable.  Maybe should provide a way to
43   switch the keymap in and out.
46 define_key(gmane_keymap, "space", null, $fallthrough);
47 define_key(gmane_keymap, "back_space", null, $fallthrough);
48 define_key(gmane_keymap, "n", null, $fallthrough);
49 define_key(gmane_keymap, "p", null, $fallthrough);
50 define_key(gmane_keymap, "N", null, $fallthrough);
51 define_key(gmane_keymap, "P", null, $fallthrough);
52 define_key(gmane_keymap, "+", null, $fallthrough);
53 define_key(gmane_keymap, "-", null, $fallthrough);
54 define_key(gmane_keymap, "f", null, $fallthrough);
55 define_key(gmane_keymap, "l", null, $fallthrough);
56 define_key(gmane_keymap, "c", null, $fallthrough);
57 define_key(gmane_keymap, "C", null, $fallthrough);
58 define_key(gmane_keymap, "R", null, $fallthrough);
59 define_key(gmane_keymap, "<", null, $fallthrough);
60 define_key(gmane_keymap, ">", null, $fallthrough);
61 define_key(gmane_keymap, ".", null, $fallthrough);
62 define_key(gmane_keymap, "down", null, $fallthrough);
63 define_key(gmane_keymap, "up", null, $fallthrough);
64 define_key(gmane_keymap, "S", null, $fallthrough);
66 define_keymaps_page_mode("gmane-mode",
67     build_url_regexp($domain = /(news|thread)\.gmane/, $tlds = ["org"]),
68     { normal: gmane_keymap },
69     $display_name = "Gmane");
71 page_mode_activate(gmane_mode);
73 provide("gmane");