2 * $Id: ebind.h 807 2007-11-09 01:21:33Z hubert@u.washington.edu $
4 * ========================================================================
5 * Copyright 2006 University of Washington
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * ========================================================================
15 * Program: Default key bindings
19 * This files describes the key bindings for pico and the pine
20 * composer. The binds are static, (i.e., no way for the user
21 * to change them) so as to keep pico/composer as simple to use
22 * as possible. This, of course, means the number of functions is
23 * greatly reduced, but, then again, this is seen as very desirable.
25 * There are very limited number of flat ctrl-key bindings left, and
26 * most of them are slated for yet-to-be implemented functions, like
27 * invoking an alternate editor in the composer and necessary funcs
28 * for implementing attachment handling. We really want to avoid
29 * going to multiple keystroke functions. -mss
33 /* EBIND: Initial default key to function bindings for
36 written by Dave G. Conroy
37 modified by Steve Wilhite, George Jones
38 greatly modified by Daniel Lawrence
47 * This table is *roughly* in ASCII order, left to right across the
48 * characters of the command. This expains the funny location of the
51 KEYTAB keytab
[NBINDS
] = {
54 {KEY_RIGHT
, forwchar
},
62 {KEY_MOUSE
, mousepress
},
64 {CTRL
|'\\', toggle_xterm_mouse
},
69 {CTRL
|'C', abort_composer
},
77 {CTRL
|'K', killregion
},
78 {CTRL
|'L', pico_refresh
},
81 {CTRL
|'O', suspend_composer
},
89 {CTRL
|'W', forwsearch
},
92 #if defined(SIGTSTP) || defined(_WINDOWS)
93 {CTRL
|'Z', bktoshell
},
97 {CTRL
|'_', alt_editor
},
98 {CTRL
|KEY_LEFT
, backword
},
99 {CTRL
|KEY_RIGHT
,forwword
},
100 {CTRL
|KEY_HOME
, gotobob
},
101 {CTRL
|KEY_END
, gotoeob
},
109 * This table is *roughly* in ASCII order, left to right across the
110 * characters of the command. This expains the funny location of the
111 * control-X commands.
113 KEYTAB pkeytab
[NBINDS
] = {
115 {KEY_DOWN
, forwline
},
116 {KEY_RIGHT
, forwchar
},
117 {KEY_LEFT
, backchar
},
118 {KEY_PGUP
, backpage
},
119 {KEY_PGDN
, forwpage
},
124 {KEY_MOUSE
, mousepress
},
126 {CTRL
|'\\', toggle_xterm_mouse
},
130 {CTRL
|'B', backchar
},
131 {CTRL
|'C', showcpos
},
134 {CTRL
|'F', forwchar
},
138 {CTRL
|'J', fillpara
},
139 {CTRL
|'K', killregion
},
140 {CTRL
|'L', pico_refresh
},
142 {CTRL
|'N', forwline
},
143 {CTRL
|'O', filewrite
},
144 {CTRL
|'P', backline
},
150 {CTRL
|'V', forwpage
},
151 {CTRL
|'W', forwsearch
},
153 {CTRL
|'Y', backpage
},
154 #if defined(SIGTSTP) || defined(_WINDOWS)
155 {CTRL
|'Z', bktoshell
},
157 {CTRL
|'@', forwword
},
159 {CTRL
|KEY_LEFT
, backword
},
160 {CTRL
|KEY_RIGHT
,forwword
},
161 {CTRL
|KEY_HOME
, gotobob
},
162 {CTRL
|KEY_END
, gotoeob
},