2 * dselect - Debian GNU/Linux package maintenance user interface
3 * methkeys.cc - method 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 methodlist_kinterps
[] = {
37 { "up", methodlist::kd_up
, 0, qa_noquit
},
38 { "down", methodlist::kd_down
, 0, qa_noquit
},
39 { "top", methodlist::kd_top
, 0, qa_noquit
},
40 { "bottom", methodlist::kd_bottom
, 0, qa_noquit
},
41 { "scrollon", methodlist::kd_scrollon
, 0, qa_noquit
},
42 { "scrollback", methodlist::kd_scrollback
, 0, qa_noquit
},
43 { "iscrollon", methodlist::kd_iscrollon
, 0, qa_noquit
},
44 { "iscrollback", methodlist::kd_iscrollback
, 0, qa_noquit
},
45 { "scrollon1", methodlist::kd_scrollon1
, 0, qa_noquit
},
46 { "scrollback1", methodlist::kd_scrollback1
, 0, qa_noquit
},
47 { "iscrollon1", methodlist::kd_iscrollon1
, 0, qa_noquit
},
48 { "iscrollback1", methodlist::kd_iscrollback1
, 0, qa_noquit
},
49 { "panon", methodlist::kd_panon
, 0, qa_noquit
},
50 { "panback", methodlist::kd_panback
, 0, qa_noquit
},
51 { "panon1", methodlist::kd_panon1
, 0, qa_noquit
},
52 { "panback1", methodlist::kd_panback1
, 0, qa_noquit
},
53 { "help", methodlist::kd_help
, 0, qa_noquit
},
54 { "search", methodlist::kd_search
, 0, qa_noquit
},
55 { "searchagain", methodlist::kd_searchagain
, 0, qa_noquit
},
56 { "redraw", methodlist::kd_redraw
, 0, qa_noquit
},
57 { "select-and-quit", methodlist::kd_quit
, 0, qa_quitchecksave
},
58 { "abort", methodlist::kd_abort
, 0, qa_quitnochecksave
},
62 #define C(x) ((x)-'a'+1)
64 const keybindings::orgbinding methodlist_korgbindings
[]= {
65 { 'j', "down" }, // vi style
68 { 'k', "up" }, // vi style
72 { C('f'), "scrollon" }, // vi style
74 { KEY_NPAGE
, "scrollon" },
76 { C('b'), "scrollback" }, // vi style
77 { 'P', "scrollback" },
78 { KEY_PPAGE
, "scrollback" },
79 { KEY_BACKSPACE
, "scrollback" },
80 { 0177,/*DEL*/ "scrollback" },
81 { C('h'), "scrollback" },
82 { C('n'), "scrollon1" },
83 { C('p'), "scrollback1" },
89 { KEY_END
, "bottom" },
91 { 'u', "iscrollback" },
93 { C('u'), "iscrollback1" },
94 { C('d'), "iscrollon1" },
97 { KEY_LEFT
, "panback" },
99 { KEY_RIGHT
, "panon" },
100 { C('b'), "panback1" },
101 { C('f'), "panon1" },
104 { KEY_HELP
, "help" },
105 { KEY_F(1), "help" },
107 { '\\', "searchagain" },
108 { C('l'), "redraw" },
110 { KEY_ENTER
, "select-and-quit" },
111 { '\r', "select-and-quit" },
112 { 27, "abort" }, // esc