~ubuntu-branches/debian/stretch/alpine/stretch

« back to all changes in this revision

Viewing changes to pico/ebind.h

  • Committer: Bazaar Package Importer
  • Author(s): Asheesh Laroia
  • Date: 2007-02-17 13:17:42 UTC
  • Revision ID: james.westby@ubuntu.com-20070217131742-99x5c6cpg1pbkdhw
Tags: upstream-0.82+dfsg
ImportĀ upstreamĀ versionĀ 0.82+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * $Id: ebind.h 113 2006-09-01 21:54:31Z hubert@u.washington.edu $
 
3
 *
 
4
 * ========================================================================
 
5
 * Copyright 2006 University of Washington
 
6
 *
 
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
 
10
 *
 
11
 *     http://www.apache.org/licenses/LICENSE-2.0
 
12
 *
 
13
 * ========================================================================
 
14
 *
 
15
 * Program:     Default key bindings
 
16
 *
 
17
 * NOTES:
 
18
 *
 
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.
 
24
 *
 
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 imlementing attachment handling.  We really want to avoid 
 
29
 *      going to multiple keystroke functions. -mss
 
30
 *
 
31
 */
 
32
 
 
33
/*      EBIND:          Initial default key to function bindings for
 
34
                        MicroEMACS 3.2
 
35
 
 
36
                        written by Dave G. Conroy
 
37
                        modified by Steve Wilhite, George Jones
 
38
                        greatly modified by Daniel Lawrence
 
39
*/
 
40
 
 
41
#ifndef EBIND_H
 
42
#define EBIND_H
 
43
 
 
44
 
 
45
/*
 
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.
 
50
 */
 
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
#endif
 
64
        {CTRL|'A',              gotobol},
 
65
        {CTRL|'B',              backchar},
 
66
        {CTRL|'C',              abort_composer},
 
67
        {CTRL|'D',              forwdel},
 
68
        {CTRL|'E',              gotoeol},
 
69
        {CTRL|'F',              forwchar},
 
70
        {CTRL|'G',              whelp},
 
71
        {CTRL|'H',              backdel},
 
72
        {CTRL|'I',              tab},
 
73
        {CTRL|'J',              fillpara},
 
74
        {CTRL|'K',              killregion},
 
75
        {CTRL|'L',              pico_refresh},
 
76
        {CTRL|'M',              newline},
 
77
        {CTRL|'N',              forwline},
 
78
        {CTRL|'O',              suspend_composer},
 
79
        {CTRL|'P',              backline},
 
80
        {CTRL|'R',              insfile},
 
81
#ifdef  SPELLER
 
82
        {CTRL|'T',              spell},
 
83
#endif  /* SPELLER */
 
84
        {CTRL|'U',              yank},
 
85
        {CTRL|'V',              forwpage},
 
86
        {CTRL|'W',              forwsearch},
 
87
        {CTRL|'X',              wquit},
 
88
        {CTRL|'Y',              backpage},
 
89
#ifdef  SIGTSTP
 
90
        {CTRL|'Z',              bktoshell},
 
91
#endif
 
92
        {CTRL|'@',              forwword},
 
93
        {CTRL|'^',              setmark},
 
94
        {CTRL|'_',              alt_editor},
 
95
        {0x7F,                  backdel},
 
96
        {0,                     NULL}
 
97
};
 
98
 
 
99
 
 
100
/*
 
101
 * Command table.
 
102
 * This table  is *roughly* in ASCII order, left to right across the
 
103
 * characters of the command. This expains the funny location of the
 
104
 * control-X commands.
 
105
 */
 
106
KEYTAB  pkeytab[NBINDS] = {
 
107
        {KEY_UP,                backline},
 
108
        {KEY_DOWN,              forwline},
 
109
        {KEY_RIGHT,             forwchar},
 
110
        {KEY_LEFT,              backchar},
 
111
        {KEY_PGUP,              backpage},
 
112
        {KEY_PGDN,              forwpage},
 
113
        {KEY_HOME,              gotobol},
 
114
        {KEY_END,               gotoeol},
 
115
        {KEY_DEL,               forwdel},
 
116
#ifdef  MOUSE
 
117
        {KEY_MOUSE,             mousepress},
 
118
#endif
 
119
        {CTRL|'A',              gotobol},
 
120
        {CTRL|'B',              backchar},
 
121
        {CTRL|'C',              showcpos},
 
122
        {CTRL|'D',              forwdel},
 
123
        {CTRL|'E',              gotoeol},
 
124
        {CTRL|'F',              forwchar},
 
125
        {CTRL|'G',              whelp},
 
126
        {CTRL|'H',              backdel},
 
127
        {CTRL|'I',              tab},
 
128
        {CTRL|'J',              fillpara},
 
129
        {CTRL|'K',              killregion},
 
130
        {CTRL|'L',              pico_refresh},
 
131
        {CTRL|'M',              newline},
 
132
        {CTRL|'N',              forwline},
 
133
        {CTRL|'O',              filewrite},
 
134
        {CTRL|'P',              backline},
 
135
        {CTRL|'R',              insfile},
 
136
#ifdef  SPELLER
 
137
        {CTRL|'T',              spell},
 
138
#endif  /* SPELLER */
 
139
        {CTRL|'U',              yank},
 
140
        {CTRL|'V',              forwpage},
 
141
        {CTRL|'W',              forwsearch},
 
142
        {CTRL|'X',              wquit},
 
143
        {CTRL|'Y',              backpage},
 
144
#ifdef  SIGTSTP
 
145
        {CTRL|'Z',              bktoshell},
 
146
#endif
 
147
        {CTRL|'@',              forwword},
 
148
        {CTRL|'^',              setmark},
 
149
        {0x7F,                  backdel},
 
150
        {0,                     NULL}
 
151
};
 
152
 
 
153
#endif  /* EBIND_H */