2 * dselect - Debian package maintenance user interface
3 * methkeys.cc - method list keybindings
5 * Copyright © 1995 Ian Jackson <ijackson@chiark.greenend.org.uk>
7 * This is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
24 #include <dpkg/dpkg-db.h>
29 const keybindings::interpretation methodlist_kinterps
[] = {
30 { "up", &methodlist::kd_up
, nullptr, qa_noquit
},
31 { "down", &methodlist::kd_down
, nullptr, qa_noquit
},
32 { "top", &methodlist::kd_top
, nullptr, qa_noquit
},
33 { "bottom", &methodlist::kd_bottom
, nullptr, qa_noquit
},
34 { "scrollon", &methodlist::kd_scrollon
, nullptr, qa_noquit
},
35 { "scrollback", &methodlist::kd_scrollback
, nullptr, qa_noquit
},
36 { "iscrollon", &methodlist::kd_iscrollon
, nullptr, qa_noquit
},
37 { "iscrollback", &methodlist::kd_iscrollback
, nullptr, qa_noquit
},
38 { "scrollon1", &methodlist::kd_scrollon1
, nullptr, qa_noquit
},
39 { "scrollback1", &methodlist::kd_scrollback1
, nullptr, qa_noquit
},
40 { "iscrollon1", &methodlist::kd_iscrollon1
, nullptr, qa_noquit
},
41 { "iscrollback1", &methodlist::kd_iscrollback1
, nullptr, qa_noquit
},
42 { "panon", &methodlist::kd_panon
, nullptr, qa_noquit
},
43 { "panback", &methodlist::kd_panback
, nullptr, qa_noquit
},
44 { "panon1", &methodlist::kd_panon1
, nullptr, qa_noquit
},
45 { "panback1", &methodlist::kd_panback1
, nullptr, qa_noquit
},
46 { "help", &methodlist::kd_help
, nullptr, qa_noquit
},
47 { "search", &methodlist::kd_search
, nullptr, qa_noquit
},
48 { "searchagain", &methodlist::kd_searchagain
, nullptr, qa_noquit
},
49 { "redraw", &methodlist::kd_redraw
, nullptr, qa_noquit
},
50 { "select-and-quit", &methodlist::kd_quit
, nullptr, qa_quitchecksave
},
51 { "abort", &methodlist::kd_abort
, nullptr, qa_quitnochecksave
},
52 { nullptr, nullptr, nullptr, qa_noquit
}
55 const keybindings::orgbinding methodlist_korgbindings
[]= {
56 { 'j', "down" }, // vi style
57 //{ 'n', "down" }, // no style
59 { 'k', "up" }, // vi style
60 //{ 'p', "up" }, // no style
63 { CTRL('f'), "scrollon" }, // vi style
65 { KEY_NPAGE
, "scrollon" },
67 { CTRL('b'), "scrollback" }, // vi style
68 { 'P', "scrollback" },
69 { KEY_PPAGE
, "scrollback" },
70 { KEY_BACKSPACE
, "scrollback" },
71 { 0177,/*DEL*/ "scrollback" },
72 { CTRL('h'), "scrollback" },
73 { CTRL('n'), "scrollon1" },
74 { CTRL('p'), "scrollback1" },
80 { KEY_END
, "bottom" },
82 { 'u', "iscrollback" },
84 { CTRL('u'), "iscrollback1" },
85 { CTRL('d'), "iscrollon1" },
88 { KEY_LEFT
, "panback" },
90 { KEY_RIGHT
, "panon" },
91 { CTRL('b'), "panback1" },
92 { CTRL('f'), "panon1" },
98 { 'n', "searchagain" },
99 { '\\', "searchagain" },
100 { CTRL('l'), "redraw" },
102 { KEY_ENTER
, "select-and-quit" },
103 { '\r', "select-and-quit" },