Compose.man 5.67 KB
Newer Older
1
.\" Copyright 2009 Oracle and/or its affiliates. All rights reserved.
2 3
.\"
.\" Permission is hereby granted, free of charge, to any person obtaining a
4 5 6 7 8
.\" copy of this software and associated documentation files (the "Software"),
.\" to deal in the Software without restriction, including without limitation
.\" the rights to use, copy, modify, merge, publish, distribute, sublicense,
.\" and/or sell copies of the Software, and to permit persons to whom the
.\" Software is furnished to do so, subject to the following conditions:
9
.\"
10 11 12
.\" The above copyright notice and this permission notice (including the next
.\" paragraph) shall be included in all copies or substantial portions of the
.\" Software.
13
.\"
14 15 16 17 18 19 20
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
.\" THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
.\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
.\" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
.\" DEALINGS IN THE SOFTWARE.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
.\"
.\" shorthand for double quote that works everywhere.
.ds q \N'34'
.ds xL Xlib \- C Language X Interface
.TH Compose __filemansuffix__ __vendorversion__
.SH NAME
Compose \- X client mappings for multi-key input sequences
.SH DESCRIPTION
The X library, libX11, provides a simple input method for characters
beyond those represented on typical keyboards using sequences of key
strokes that are combined to enter a single character.
.PP
The compose file is searched for in  the following order:
.IP -
If the environment variable
.B $XCOMPOSEFILE
is set, its value is used as the name of the Compose file.
.IP -
If the user's home directory has a file named
.IR .XCompose ,
it is used as the Compose file.
.IP -
The system provided compose file is used by mapping the locale to a compose
file from the list in
.IR __xlocaledir__/compose.dir .
.PP
Compose files can use an
.RB \*q include \*q
49 50 51 52
instruction.
This allows local modifications to be made to existing compose
files without including all of the content directly.
For example, the
53 54
system's iso8859-1 compose file can be included with a line like this:
.RS 4
55
.BI "include \*q" %S/iso8859-1/Compose \*q
56 57
.RE
.PP
58 59 60
There are several substitutions that can be made in the file name of the
include instruction:
.TP 4
61 62 63
.I %H
expands to the user's home directory (the
.B $HOME
64 65
environment variable)
.TP 4
66 67
.I %L
expands to the name of the locale specific Compose file (i.e.,
68 69 70 71 72
.RI \*q __xlocaledir__/<localename>/Compose \*q)
.TP 4
.I %S
expands to the name of the system directory for Compose files (i.e.,
.RI \*q __xlocaledir__ \*q)
73 74 75 76 77 78
.PP
For example, you can include in your compose file the default Compose file
by using:
.RS
.B "include \*q%L\*q"
.RE
79 80
and then rewrite only the few rules that you need to change.
New
81 82 83 84
compose rules can be added, and previous ones replaced.
.SH FILE FORMAT
.\" Based on grammar description in modules/im/ximcp/imLcPrs.c
Compose files are plain text files, with a separate line for each compose
85 86 87
sequence.
Comments begin with \fB#\fP characters.
Each compose sequence
88 89 90 91 92 93 94 95
specifies one or more events and a resulting input sequence, with an optional
comment at the end of the line:
.RS
\fIEVENT\fP [\fIEVENT\fP...] \fB:\fP \fIRESULT\fP [\fB#\fP \fICOMMENT\fP]
.RE
.PP
Each event consists of a specified input keysym, and optional modifier states:
.RS
96
[([\fB!\fP] ([\fB~\fP] \fIMODIFIER\fP)...) | \fBNone\fP] \fB<\fP\fIkeysym\fP\fB>\fP
97 98
.RE
.PP
99 100 101 102 103
If the modifier list is preceded by
.RB \*q "!" \*q
it must match exactly.
MODIFIER may be one of Ctrl, Lock, Caps, Shift, Alt or Meta.
Each modifier may be preceded by a
104
.RB \*q "~" \*q
105 106
character to indicate that the modifier must not be present.
If
107 108
.RB \*q "None" \*q
is specified, no modifier may be present.
109 110 111 112 113 114 115 116 117 118
.PP
The result specifies a string, keysym, or both, that the X client receives
as input when the sequence of events is input:
.RS
\fB\*q\fP\fISTRING\fP\fB\*q\fP | \fIkeysym\fP | \fB\*q\fP\fISTRING\fP\fB\*q\fP \fIkeysym\fP
.RE
.PP
Keysyms are specified without the \fBXK_\fP prefix.
.PP
Strings may be direct text encoded in the locale for which the compose file is
119 120
to be used, or an escaped octal or hexadecimal character code.
Octal codes
121
are specified as \fB\*q\\123\*q\fP and hexadecimal codes as
122
\fB\*q\\x3a\*q\fP.
123
It is not necessary to specify in the right part of a rule a locale encoded
124 125
string in addition to the keysym name.
If the string is omitted, Xlib
126 127 128 129 130 131
figures it out from the keysym according to the current locale.
I.e., if a rule looks like:
.RS
\fB<dead_grave> <A> : \*q\\300\*q Agrave\fP
.RE
the result of the composition is always the letter with the "\\300"
132 133
code.
But if the rule is:
134 135 136 137 138 139 140 141 142 143 144 145 146
.RS
\fB<dead_grave> <A> : Agrave\fP
.RE
the result depends on how Agrave is mapped in the current locale.
.SH ENVIRONMENT
.TP
.B XCOMPOSEFILE
File to use for compose sequences.
.TP
.B XCOMPOSECACHE
Directory to use for caching compiled compose files.
.SH FILES
.TP
147
.I $HOME/.XCompose
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
User default compose file if XCOMPOSEFILE is not set.
.TP
.I __xlocaledir__/compose.dir
File listing the compose file path to use for each locale.
.TP
.I __xlocaledir__/<localemapping>/Compose
System default compose file for the locale, mapped via compose.dir.
.TP
.I /var/cache/libx11/compose/
System-wide cache directory for compiled compose files.
.TP
.I $HOME/.compose-cache/
Per-user cache directory for compiled compose files.
.SH SEE ALSO
.BR XLookupString (__libmansuffix__),
.BR XmbLookupString (__libmansuffix__),
.BR XwcLookupString (__libmansuffix__),
.BR Xutf8LookupString (__libmansuffix__),
.BR mkcomposecache (__appmansuffix__),
.BR locale (__miscmansuffix__).
.br
\fI\*(xL\fP