|
|
1.1 root 1: .TH KEYCOMP 1 "18 August 1985" "X Version 10"
2: .SH NAME
3: keycomp - X window system keyboard mapping file compiler
4: .SH SYNOPSIS
5: .B keycomp
6: < input_file > output_file
7: .SH DESCRIPTION
8: Programs that use the X window system, such as \fIxterm(1)\fP, need some way
9: to translate the user's key strokes into character strings. Such
10: programs look up this keyboard-to-character string mapping in a binary
11: keymap file by calling the library routine \fIXLookupMapping\fP. Initially,
12: this routine looks for the file \fI.Xkeymap\fP in the user's home directory;
13: if this file doesn't exist, uses a built in table.
14: .PP
15: The compiled file format produced by \fIkeycomp\fP should be portable across
16: machine architectures.
17: .PP
18: The \fIkeycomp\fP program (an abbreviation for ``keymap compiler'') reads in a
19: textual description of this mapping and produces a binary keymap file on
20: its standard output.
21: .PP
22: Each key may have up to 16 different bindings, depending on what
23: combinations of the Shift, Lock, Control, and Meta keys are depressed.
24: For instance, in a conventional QWERTY keyboard mapping, pressing the ``A''
25: key produces a capital ``A'' when the Shift or Lock key is down, an
26: octal 001 when the Control key is down, and a small ``a'' when no
27: other key is down.
28:
29: The input file to \fIkeycomp\fP consists of one or more lines. Each line
30: begins with an octal or decimal number designating an X keyboard code.
31: After the key code, the line should contain either 1 or 16 items, each
32: representing the binding for a particular combination of the Control,
33: Meta, Shift, and Lock keys. The items should be separated by white
34: space; the format of the items is described later. The bindings should
35: be in this order:
36:
37: #1 ``unshifted'': none of Shift, Lock, Control, or Meta keys down
38: .br
39: #2 Lock key down
40: .br
41: #3 Shift key down
42: .br
43: #4 Shift and Lock keys down
44: .br
45: #5 Meta key down
46: .br
47: #6 Meta and Lock keys down
48: .br
49: #7 Meta and Shift keys down
50: .br
51: #8 Meta, Shift, and Lock keys down
52: .br
53: #9 Control key down
54: .br
55: #10 Control and Lock keys down
56: .br
57: #11 Control and Shift keys down
58: .br
59: #12 Control, Shift, and Lock keys down
60: .br
61: #13 Control and Meta keys down
62: .br
63: #14 Control, Meta, and Lock keys down
64: .br
65: #15 Control, Meta, and Shift keys down
66: .br
67: #16 Control, Meta, Shift, and Lock keys down
68:
69: If only one item is present on the line, then it represents the binding
70: for this key regardless of the positions of the Control, Meta, Shift,
71: and Lock keys.
72:
73: Each item should be one of the following:
74:
75: An octal or decimal number, indicating a character code
76:
77: A C character literal, surrounded by single quotes. Escape
78: sequences (such as `\n' or `\252') are allowed, as described in the C
79: Reference Manual.
80:
81: A C string literal, surrounded by double quotes. Again, standard C
82: escape sequences are allowed within the string.
83:
84: The letter U, indicating ``no binding''. If there is no binding,
85: then XLookupMapping will return an empty string for this key
86: combination.
87:
88: A comma may, but need not, follow each item. Whether or not a comma
89: is present, white space (spaces or tabs) must separate the items. All
90: text to the right of the 16th item is ignored; comments may appear here.
91:
92: Completely blank lines are ignored, as are lines beginning with the '#'
93: character. Furthermore, all text between a `#' character and the
94: following newline is ignored, provided that the `#' is not part of a
95: string enclosed in single or double quotes. This allows you to place
96: comments at the end of a line that contains only a single item.
97:
98: You can look at the file \fI<X/Xkeyboard.h>\fP for a list of key codes and
99: key names of function keys.
100:
101: .SH FILES
102: $HOME/.Xkeymap, /usr/lib/Xkeymap.txt, <X/Xkeyboard.h>
103: .SH SEE ALSO
104: X(1), xterm(1)
105: .SH DIAGNOSTICS
106: ``Couldn't fseek output file''
107: .br
108: The standard output must be a file, not a pipe or a terminal.
109:
110: ``Error writing beginning of output file''
111: .br
112: ``Error writing extension to output file''
113: .br
114: \fIkeycomp\fP couldn't write the output file. Maybe the file system
115: is out of space.
116:
117: ``Parse error at item <number> on line <number>:
118: .br
119: <message>''
120: .br
121: The source file has a syntax error. Possible <message>s include:
122:
123: ``Line doesn't begin with key''
124: .br
125: The first few characters in the line, which should be a key number,
126: were not recognizable as an octal or decimal number.
127:
128: ``Keycode is too big''
129: .br
130: The key at the beginning of the line was greater than 0377 (octal).
131:
132: ``Line doesn't have 1 or 16 entries''
133: .br
134: After the key, more than one but less than 16 items were found. Or
135: no items were found at all.
136:
137: ``Number after backslash is too big for a character constant''
138: .br
139: In a character constant of the form `\nnn', the octal number was
140: greater than 377 (octal).
141:
142: ``Closing single quote not found''
143: .br
144: A single quote (') was encountered, but the end of the line was reached
145: before finding the matching closing single quote.
146:
147: ``String is too long''
148: .br
149: More than 80 characters are not allowed between double quotes.
150:
151: ``Closing double quote not found''
152: .br
153: A double quote (") was encountered, but the end of the line was reached
154: before finding the matching closing double quote.
155:
156: ``Too many characters for single character constant''
157: .br
158: Too many characters appear between single quotes. If you want to
159: bind a key to a multiple-character sequence, use double quotes.
160:
161: ``Not a U, number, single- or double-quoted string''
162: .br
163: \fIkeycomp\fP can't parse this item; it is neither the letter U, nor an
164: octal or decimal number, nor a string enclosed in single or double
165: quotes.
166: .SH AUTHOR
167: Ron Newman, MIT Project Athena
168: .br
169: Copyright 1985, 1986, Massachusetts Institute of Technology.
170: .br
171: See \fIX(1)\fP for a full copyright notice.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.