2 * dselect - Debian GNU/Linux package maintenance user interface
3 * pkgkeys.cc - package list keybindings
5 * Copyright (C) 1995 Ian Jackson <iwj10@cus.cam.ac.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
9 * published by the Free Software Foundation; either version 2,
10 * or (at your option) any later version.
12 * This is distributed in the hope that it will be useful, but
13 * 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
18 * License along with this; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
36 const keybindings::interpretation packagelist_kinterps
[] = {
37 { "up", 0, packagelist::kd_up
, qa_noquit
},
38 { "down", 0, packagelist::kd_down
, qa_noquit
},
39 { "top", 0, packagelist::kd_top
, qa_noquit
},
40 { "bottom", 0, packagelist::kd_bottom
, qa_noquit
},
41 { "scrollon", 0, packagelist::kd_scrollon
, qa_noquit
},
42 { "scrollback", 0, packagelist::kd_scrollback
, qa_noquit
},
43 { "iscrollon", 0, packagelist::kd_iscrollon
, qa_noquit
},
44 { "iscrollback", 0, packagelist::kd_iscrollback
, qa_noquit
},
45 { "scrollon1", 0, packagelist::kd_scrollon1
, qa_noquit
},
46 { "scrollback1", 0, packagelist::kd_scrollback1
, qa_noquit
},
47 { "iscrollon1", 0, packagelist::kd_iscrollon1
, qa_noquit
},
48 { "iscrollback1", 0, packagelist::kd_iscrollback1
, qa_noquit
},
49 { "panon", 0, packagelist::kd_panon
, qa_noquit
},
50 { "panback", 0, packagelist::kd_panback
, qa_noquit
},
51 { "panon1", 0, packagelist::kd_panon1
, qa_noquit
},
52 { "panback1", 0, packagelist::kd_panback1
, qa_noquit
},
53 { "install", 0, packagelist::kd_select
, qa_noquit
},
54 { "remove", 0, packagelist::kd_deselect
, qa_noquit
},
55 { "purge", 0, packagelist::kd_purge
, qa_noquit
},
56 { "hold", 0, packagelist::kd_hold
, qa_noquit
},
57 { "unhold", 0, packagelist::kd_unhold
, qa_noquit
},
58 { "info", 0, packagelist::kd_info
, qa_noquit
},
59 { "toggleinfo", 0, packagelist::kd_toggleinfo
, qa_noquit
},
60 { "verbose", 0, packagelist::kd_verbose
, qa_noquit
},
61 { "versiondisplay", 0, packagelist::kd_versiondisplay
, qa_noquit
},
62 { "help", 0, packagelist::kd_help
, qa_noquit
},
63 { "search", 0, packagelist::kd_search
, qa_noquit
},
64 { "searchagain", 0, packagelist::kd_searchagain
, qa_noquit
},
65 { "swaporder", 0, packagelist::kd_swaporder
, qa_noquit
},
66 { "swapstatorder", 0, packagelist::kd_swapstatorder
, qa_noquit
},
67 { "redraw", 0, packagelist::kd_redraw
, qa_noquit
},
68 { "quitcheck", 0, packagelist::kd_quit_noop
, qa_quitchecksave
},
69 { "quitrejectsug", 0, packagelist::kd_revertdirect
, qa_quitnochecksave
},
70 { "quitnocheck", 0, packagelist::kd_quit_noop
, qa_quitnochecksave
},
71 { "abortnocheck", 0, packagelist::kd_revert_abort
, qa_quitnochecksave
},
72 { "revert", 0, packagelist::kd_revert_abort
, qa_noquit
},
73 { "revertsuggest", 0, packagelist::kd_revertsuggest
, qa_noquit
},
74 { "revertdirect", 0, packagelist::kd_revertdirect
, qa_noquit
},
78 #define C(x) ((x)-'a'+1)
80 const keybindings::orgbinding packagelist_korgbindings
[]= {
81 { 'j', "down" }, // vi style
84 { 'k', "up" }, // vi style
89 { KEY_NPAGE
, "scrollon" },
91 { 'P', "scrollback" },
92 { KEY_PPAGE
, "scrollback" },
93 { KEY_BACKSPACE
, "scrollback" },
94 { 0177, "scrollback" }, // ASCII DEL
95 { C('h'), "scrollback" },
96 { C('n'), "scrollon1" },
97 { C('p'), "scrollback1" },
102 { KEY_LL
, "bottom" },
103 { KEY_END
, "bottom" },
105 { 'u', "iscrollback" },
106 { 'd', "iscrollon" },
107 { C('u'), "iscrollback1" },
108 { C('d'), "iscrollon1" },
111 { KEY_LEFT
, "panback" },
113 { KEY_RIGHT
, "panon" },
114 { C('b'), "panback1" },
115 { C('f'), "panon1" },
118 { KEY_IC
, "install" },
120 { KEY_DC
, "remove" },
127 { KEY_HELP
, "help" },
128 { KEY_F(1), "help" },
130 { 'I', "toggleinfo" },
131 { 'o', "swaporder" },
132 { 'O', "swapstatorder" },
134 { 'V', "versiondisplay" },
135 { C('l'), "redraw" },
137 { '\\', "searchagain" },
139 { KEY_ENTER
, "quitcheck" },
140 { '\r', "quitcheck" },
141 { 'Q', "quitnocheck" },
142 { 'x', "abortnocheck" },
143 { 'X', "abortnocheck" },
145 { 'U', "revertsuggest" },
146 { 'D', "revertdirect" },