2 * (C) Copyright 2008 David Kettler
3 * (C) Copyright 2009-2010 John J. Foerch
5 * Use, modification, and distribution are subject to the terms specified in the
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
25 - Go to the previous page
26 f Go to the first page
28 c Catch up -- mark all articles as read
29 C Clear -- mark all articles as unread
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);
67 var gmane_modality = {
71 define_page_mode("gmane-mode",
72 build_url_regex($domain = /(news|thread)\.gmane/, $tlds = ["org"]),
73 function enable (buffer) {
74 buffer.content_modalities.push(gmane_modality);
76 function disable (buffer) {
77 var i = buffer.content_modalities.indexOf(gmane_modality);
79 buffer.content_modalities.splice(i, 1);
81 $display_name = "Gmane");
83 page_mode_activate(gmane_mode);