* Fix for file imap/Makefile contributed by Paul Ferster that fixes
[alpine.git] / pico / ebind.h
blob1a0698eafe206a3738c57471a2d2b5dd3521d667
1 /*
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
17 * NOTES:
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
34 MicroEMACS 3.2
36 written by Dave G. Conroy
37 modified by Steve Wilhite, George Jones
38 greatly modified by Daniel Lawrence
41 #ifndef EBIND_H
42 #define EBIND_H
46 * Command table.
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
49 * control-X commands.
51 KEYTAB keytab[NBINDS] = {
52 {KEY_UP, backline},
53 {KEY_DOWN, forwline},
54 {KEY_RIGHT, forwchar},
55 {KEY_LEFT, backchar},
56 {KEY_PGUP, backpage},
57 {KEY_PGDN, forwpage},
58 {KEY_HOME, gotobol},
59 {KEY_END, gotoeol},
60 {KEY_DEL, forwdel},
61 #ifdef MOUSE
62 {KEY_MOUSE, mousepress},
63 #ifndef _WINDOWS
64 {CTRL|'\\', toggle_xterm_mouse},
65 #endif
66 #endif
67 {CTRL|'A', gotobol},
68 {CTRL|'B', backchar},
69 {CTRL|'C', abort_composer},
70 {CTRL|'D', forwdel},
71 {CTRL|'E', gotoeol},
72 {CTRL|'F', forwchar},
73 {CTRL|'G', whelp},
74 {CTRL|'H', backdel},
75 {CTRL|'I', tab},
76 {CTRL|'J', fillpara},
77 {CTRL|'K', killregion},
78 {CTRL|'L', pico_refresh},
79 {CTRL|'M', newline},
80 {CTRL|'N', forwline},
81 {CTRL|'O', suspend_composer},
82 {CTRL|'P', backline},
83 {CTRL|'R', insfile},
84 #ifdef SPELLER
85 {CTRL|'T', spell},
86 #endif /* SPELLER */
87 {CTRL|'U', yank},
88 {CTRL|'V', forwpage},
89 {CTRL|'W', forwsearch},
90 {CTRL|'X', wquit},
91 {CTRL|'Y', backpage},
92 #if defined(SIGTSTP) || defined(_WINDOWS)
93 {CTRL|'Z', bktoshell},
94 #endif
95 {CTRL|'@', forwword},
96 {CTRL|'^', setmark},
97 {CTRL|'_', alt_editor},
98 {CTRL|KEY_LEFT, backword},
99 {CTRL|KEY_RIGHT,forwword},
100 {CTRL|KEY_HOME, gotobob},
101 {CTRL|KEY_END, gotoeob},
102 {0x7F, backdel},
103 {0, NULL}
108 * Command table.
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] = {
114 {KEY_UP, backline},
115 {KEY_DOWN, forwline},
116 {KEY_RIGHT, forwchar},
117 {KEY_LEFT, backchar},
118 {KEY_PGUP, backpage},
119 {KEY_PGDN, forwpage},
120 {KEY_HOME, gotobol},
121 {KEY_END, gotoeol},
122 {KEY_DEL, forwdel},
123 #ifdef MOUSE
124 {KEY_MOUSE, mousepress},
125 #ifndef _WINDOWS
126 {CTRL|'\\', toggle_xterm_mouse},
127 #endif
128 #endif
129 {CTRL|'A', gotobol},
130 {CTRL|'B', backchar},
131 {CTRL|'C', showcpos},
132 {CTRL|'D', forwdel},
133 {CTRL|'E', gotoeol},
134 {CTRL|'F', forwchar},
135 {CTRL|'G', whelp},
136 {CTRL|'H', backdel},
137 {CTRL|'I', tab},
138 {CTRL|'J', fillpara},
139 {CTRL|'K', killregion},
140 {CTRL|'L', pico_refresh},
141 {CTRL|'M', newline},
142 {CTRL|'N', forwline},
143 {CTRL|'O', filewrite},
144 {CTRL|'P', backline},
145 {CTRL|'R', insfile},
146 #ifdef SPELLER
147 {CTRL|'T', spell},
148 #endif /* SPELLER */
149 {CTRL|'U', yank},
150 {CTRL|'V', forwpage},
151 {CTRL|'W', forwsearch},
152 {CTRL|'X', wquit},
153 {CTRL|'Y', backpage},
154 #if defined(SIGTSTP) || defined(_WINDOWS)
155 {CTRL|'Z', bktoshell},
156 #endif
157 {CTRL|'@', forwword},
158 {CTRL|'^', setmark},
159 {CTRL|KEY_LEFT, backword},
160 {CTRL|KEY_RIGHT,forwword},
161 {CTRL|KEY_HOME, gotobob},
162 {CTRL|KEY_END, gotoeob},
163 {0x7F, backdel},
164 {0, NULL}
167 #endif /* EBIND_H */