|
|
1.1 root 1:
2:
3:
4: KEYCOMP(1) UNIX Programmer's Manual KEYCOMP(1)
5:
6:
7:
8: NAME
9: keycomp - X window system keyboard mapping file compiler
10:
11: SYNOPSIS
12: keycomp < input_file > output_file
13:
14: DESCRIPTION
15: Programs that use the X window system, such as _x_t_e_r_m(_1),
16: need some way to translate the user's key strokes into char-
17: acter strings. Such programs look up this keyboard-to-
18: character string mapping in a binary keymap file by calling
19: the library routine _X_L_o_o_k_u_p_M_a_p_p_i_n_g. Initially, this routine
20: looks for the file ._X_k_e_y_m_a_p in the user's home directory; if
21: this file doesn't exist, uses a built in table.
22:
23: The compiled file format produced by _k_e_y_c_o_m_p should be port-
24: able across machine architectures.
25:
26: The _k_e_y_c_o_m_p program (an abbreviation for ``keymap com-
27: piler'') reads in a textual description of this mapping and
28: produces a binary keymap file on its standard output.
29:
30: Each key may have up to 16 different bindings, depending on
31: what combinations of the Shift, Lock, Control, and Meta keys
32: are depressed. For instance, in a conventional QWERTY key-
33: board mapping, pressing the ``A'' key produces a capital
34: ``A'' when the Shift or Lock key is down, an octal 001 when
35: the Control key is down, and a small ``a'' when no other key
36: is down.
37:
38: The input file to _k_e_y_c_o_m_p consists of one or more lines.
39: Each line begins with an octal or decimal number designating
40: an X keyboard code. After the key code, the line should
41: contain either 1 or 16 items, each representing the binding
42: for a particular combination of the Control, Meta, Shift,
43: and Lock keys. The items should be separated by white
44: space; the format of the items is described later. The
45: bindings should be in this order:
46:
47: #1 ``unshifted'': none of Shift, Lock, Control, or Meta
48: keys down
49: #2 Lock key down
50: #3 Shift key down
51: #4 Shift and Lock keys down
52: #5 Meta key down
53: #6 Meta and Lock keys down
54: #7 Meta and Shift keys down
55: #8 Meta, Shift, and Lock keys down
56: #9 Control key down
57: #10 Control and Lock keys down
58: #11 Control and Shift keys down
59: #12 Control, Shift, and Lock keys down
60:
61:
62:
63: Printed 9/15/87 18 August 1985 1
64:
65:
66:
67:
68:
69:
70: KEYCOMP(1) UNIX Programmer's Manual KEYCOMP(1)
71:
72:
73:
74: #13 Control and Meta keys down
75: #14 Control, Meta, and Lock keys down
76: #15 Control, Meta, and Shift keys down
77: #16 Control, Meta, Shift, and Lock keys down
78:
79: If only one item is present on the line, then it represents
80: the binding for this key regardless of the positions of the
81: Control, Meta, Shift, and Lock keys.
82:
83: Each item should be one of the following:
84:
85: An octal or decimal number, indicating a character code
86:
87: A C character literal, surrounded by single quotes.
88: Escape sequences (such as `0 or `252') are allowed, as
89: described in the C Reference Manual.
90:
91: A C string literal, surrounded by double quotes. Again,
92: standard C escape sequences are allowed within the string.
93:
94: The letter U, indicating ``no binding''. If there is no
95: binding, then XLookupMapping will return an empty string for
96: this key combination.
97:
98: A comma may, but need not, follow each item. Whether or not
99: a comma is present, white space (spaces or tabs) must
100: separate the items. All text to the right of the 16th item
101: is ignored; comments may appear here.
102:
103: Completely blank lines are ignored, as are lines beginning
104: with the '#' character. Furthermore, all text between a `#'
105: character and the following newline is ignored, provided
106: that the `#' is not part of a string enclosed in single or
107: double quotes. This allows you to place comments at the end
108: of a line that contains only a single item.
109:
110: You can look at the file <_X/_X_k_e_y_b_o_a_r_d._h> for a list of key
111: codes and key names of function keys.
112:
113:
114: FILES
115: $HOME/.Xkeymap, /usr/lib/Xkeymap.txt, <X/Xkeyboard.h>
116:
117: SEE ALSO
118: X(1), xterm(1)
119:
120: DIAGNOSTICS
121: ``Couldn't fseek output file''
122: The standard output must be a file, not a pipe or a termi-
123: nal.
124:
125: ``Error writing beginning of output file''
126:
127:
128:
129: Printed 9/15/87 18 August 1985 2
130:
131:
132:
133:
134:
135:
136: KEYCOMP(1) UNIX Programmer's Manual KEYCOMP(1)
137:
138:
139:
140: ``Error writing extension to output file''
141: _k_e_y_c_o_m_p couldn't write the output file. Maybe the file sys-
142: tem is out of space.
143:
144: ``Parse error at item <number> on line <number>:
145: <message>''
146: The source file has a syntax error. Possible <message>s
147: include:
148:
149: ``Line doesn't begin with key''
150: The first few characters in the line, which should be a key
151: number, were not recognizable as an octal or decimal number.
152:
153: ``Keycode is too big''
154: The key at the beginning of the line was greater than 0377
155: (octal).
156:
157: ``Line doesn't have 1 or 16 entries''
158: After the key, more than one but less than 16 items were
159: found. Or no items were found at all.
160:
161: ``Number after backslash is too big for a character con-
162: stant''
163: In a character constant of the form `0n', the octal number
164: was greater than 377 (octal).
165:
166: ``Closing single quote not found''
167: A single quote (') was encountered, but the end of the line
168: was reached before finding the matching closing single
169: quote.
170:
171: ``String is too long''
172: More than 80 characters are not allowed between double
173: quotes.
174:
175: ``Closing double quote not found''
176: A double quote (") was encountered, but the end of the line
177: was reached before finding the matching closing double
178: quote.
179:
180: ``Too many characters for single character constant''
181: Too many characters appear between single quotes. If you
182: want to bind a key to a multiple-character sequence, use
183: double quotes.
184:
185: ``Not a U, number, single- or double-quoted string''
186: _k_e_y_c_o_m_p can't parse this item; it is neither the letter U,
187: nor an octal or decimal number, nor a string enclosed in
188: single or double quotes.
189:
190: AUTHOR
191: Ron Newman, MIT Project Athena
192:
193:
194:
195: Printed 9/15/87 18 August 1985 3
196:
197:
198:
199:
200:
201:
202: KEYCOMP(1) UNIX Programmer's Manual KEYCOMP(1)
203:
204:
205:
206: Copyright 1985, 1986, Massachusetts Institute of Technology.
207: See _X(_1) for a full copyright notice.
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261: Printed 9/15/87 18 August 1985 4
262:
263:
264:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.