Blame man/Compose.man

Packit 5bd3a9
.\" Copyright 2009 Oracle and/or its affiliates. All rights reserved.
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" Permission is hereby granted, free of charge, to any person obtaining a
Packit 5bd3a9
.\" copy of this software and associated documentation files (the "Software"),
Packit 5bd3a9
.\" to deal in the Software without restriction, including without limitation
Packit 5bd3a9
.\" the rights to use, copy, modify, merge, publish, distribute, sublicense,
Packit 5bd3a9
.\" and/or sell copies of the Software, and to permit persons to whom the
Packit 5bd3a9
.\" Software is furnished to do so, subject to the following conditions:
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" The above copyright notice and this permission notice (including the next
Packit 5bd3a9
.\" paragraph) shall be included in all copies or substantial portions of the
Packit 5bd3a9
.\" Software.
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
Packit 5bd3a9
.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
Packit 5bd3a9
.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
Packit 5bd3a9
.\" THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
Packit 5bd3a9
.\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
Packit 5bd3a9
.\" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
Packit 5bd3a9
.\" DEALINGS IN THE SOFTWARE.
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" shorthand for double quote that works everywhere.
Packit 5bd3a9
.ds q \N'34'
Packit 5bd3a9
.ds xL Xlib \- C Language X Interface
Packit 5bd3a9
.TH Compose __filemansuffix__ __vendorversion__
Packit 5bd3a9
.SH NAME
Packit 5bd3a9
Compose \- X client mappings for multi-key input sequences
Packit 5bd3a9
.SH DESCRIPTION
Packit 5bd3a9
The X library, libX11, provides a simple input method for characters
Packit 5bd3a9
beyond those represented on typical keyboards using sequences of key
Packit 5bd3a9
strokes that are combined to enter a single character.
Packit 5bd3a9
.PP
Packit 5bd3a9
The compose file is searched for in  the following order:
Packit 5bd3a9
.IP -
Packit 5bd3a9
If the environment variable
Packit 5bd3a9
.B $XCOMPOSEFILE
Packit 5bd3a9
is set, its value is used as the name of the Compose file.
Packit 5bd3a9
.IP -
Packit 5bd3a9
If the user's home directory has a file named
Packit 5bd3a9
.IR .XCompose ,
Packit 5bd3a9
it is used as the Compose file.
Packit 5bd3a9
.IP -
Packit 5bd3a9
The system provided compose file is used by mapping the locale to a compose
Packit 5bd3a9
file from the list in
Packit 5bd3a9
.IR __xlocaledir__/compose.dir .
Packit 5bd3a9
.PP
Packit 5bd3a9
Compose files can use an
Packit 5bd3a9
.RB \*q include \*q
Packit 5bd3a9
instruction.  This allows local modifications to be made to existing compose
Packit 5bd3a9
files without including all of the content directly.  For example, the
Packit 5bd3a9
system's iso8859-1 compose file can be included with a line like this:
Packit 5bd3a9
.RS 4
Packit 5bd3a9
.BI "include \*q" %S/iso8859-1/Compose \*q
Packit 5bd3a9
.RE
Packit 5bd3a9
.PP
Packit 5bd3a9
There are several substitutions that can be made in the file name of the
Packit 5bd3a9
include instruction:
Packit 5bd3a9
.TP 4
Packit 5bd3a9
.I %H
Packit 5bd3a9
expands to the user's home directory (the
Packit 5bd3a9
.B $HOME
Packit 5bd3a9
environment variable)
Packit 5bd3a9
.TP 4
Packit 5bd3a9
.I %L
Packit 5bd3a9
expands to the name of the locale specific Compose file (i.e.,
Packit 5bd3a9
.RI \*q __xlocaledir__/<localename>/Compose \*q)
Packit 5bd3a9
.TP 4
Packit 5bd3a9
.I %S
Packit 5bd3a9
expands to the name of the system directory for Compose files (i.e.,
Packit 5bd3a9
.RI \*q __xlocaledir__ \*q)
Packit 5bd3a9
.PP
Packit 5bd3a9
For example, you can include in your compose file the default Compose file
Packit 5bd3a9
by using:
Packit 5bd3a9
.RS
Packit 5bd3a9
.B "include \*q%L\*q"
Packit 5bd3a9
.RE
Packit 5bd3a9
and then rewrite only the few rules that you need to change.  New
Packit 5bd3a9
compose rules can be added, and previous ones replaced.
Packit 5bd3a9
.SH FILE FORMAT
Packit 5bd3a9
.\" Based on grammar description in modules/im/ximcp/imLcPrs.c
Packit 5bd3a9
Compose files are plain text files, with a separate line for each compose
Packit 5bd3a9
sequence.   Comments begin with \fB#\fP characters.   Each compose sequence
Packit 5bd3a9
specifies one or more events and a resulting input sequence, with an optional
Packit 5bd3a9
comment at the end of the line:
Packit 5bd3a9
.RS
Packit 5bd3a9
\fIEVENT\fP [\fIEVENT\fP...] \fB:\fP \fIRESULT\fP [\fB#\fP \fICOMMENT\fP]
Packit 5bd3a9
.RE
Packit 5bd3a9
.PP
Packit 5bd3a9
Each event consists of a specified input keysym, and optional modifier states:
Packit 5bd3a9
.RS
Packit 5bd3a9
[([\fB!\fP] ([\fB~\fP] \fIMODIFIER\fP)...) | \fBNone\fP] \fB<\fP\fIkeysym\fP\fB>\fP
Packit 5bd3a9
.RE
Packit 5bd3a9
.PP
Packit 5bd3a9
If the modifier list is preceded by
Packit 5bd3a9
.RB \*q "!" \*q
Packit 5bd3a9
it must match exactly.
Packit 5bd3a9
MODIFIER may be one of Ctrl, Lock, Caps, Shift, Alt or Meta.
Packit 5bd3a9
Each modifier may be preceded by a
Packit 5bd3a9
.RB \*q "~" \*q
Packit 5bd3a9
character to indicate that the modifier must not be present. If
Packit 5bd3a9
.RB \*q "None" \*q
Packit 5bd3a9
is specified, no modifier may be present.
Packit 5bd3a9
.PP
Packit 5bd3a9
The result specifies a string, keysym, or both, that the X client receives
Packit 5bd3a9
as input when the sequence of events is input:
Packit 5bd3a9
.RS
Packit 5bd3a9
\fB\*q\fP\fISTRING\fP\fB\*q\fP | \fIkeysym\fP | \fB\*q\fP\fISTRING\fP\fB\*q\fP \fIkeysym\fP
Packit 5bd3a9
.RE
Packit 5bd3a9
.PP
Packit 5bd3a9
Keysyms are specified without the \fBXK_\fP prefix.
Packit 5bd3a9
.PP
Packit 5bd3a9
Strings may be direct text encoded in the locale for which the compose file is
Packit 5bd3a9
to be used, or an escaped octal or hexadecimal character code.   Octal codes
Packit 5bd3a9
are specified as \fB\*q\\123\*q\fP and hexadecimal codes as
Packit 5bd3a9
\fB\*q\\x3a\*q\fP.
Packit 5bd3a9
It is not necessary to specify in the right part of a rule a locale encoded
Packit 5bd3a9
string in addition to the keysym name.  If the string is omitted, Xlib
Packit 5bd3a9
figures it out from the keysym according to the current locale.
Packit 5bd3a9
I.e., if a rule looks like:
Packit 5bd3a9
.RS
Packit 5bd3a9
\fB<dead_grave>  : \*q\\300\*q Agrave\fP
Packit 5bd3a9
.RE
Packit 5bd3a9
the result of the composition is always the letter with the "\\300"
Packit 5bd3a9
code.  But if the rule is:
Packit 5bd3a9
.RS
Packit 5bd3a9
\fB<dead_grave>  : Agrave\fP
Packit 5bd3a9
.RE
Packit 5bd3a9
the result depends on how Agrave is mapped in the current locale.
Packit 5bd3a9
.SH ENVIRONMENT
Packit 5bd3a9
.TP
Packit 5bd3a9
.B XCOMPOSEFILE
Packit 5bd3a9
File to use for compose sequences.
Packit 5bd3a9
.TP
Packit 5bd3a9
.B XCOMPOSECACHE
Packit 5bd3a9
Directory to use for caching compiled compose files.
Packit 5bd3a9
.SH FILES
Packit 5bd3a9
.TP
Packit 5bd3a9
.I $HOME/.XCompose
Packit 5bd3a9
User default compose file if XCOMPOSEFILE is not set.
Packit 5bd3a9
.TP
Packit 5bd3a9
.I __xlocaledir__/compose.dir
Packit 5bd3a9
File listing the compose file path to use for each locale.
Packit 5bd3a9
.TP
Packit 5bd3a9
.I __xlocaledir__/<localemapping>/Compose
Packit 5bd3a9
System default compose file for the locale, mapped via compose.dir.
Packit 5bd3a9
.TP
Packit 5bd3a9
.I /var/cache/libx11/compose/
Packit 5bd3a9
System-wide cache directory for compiled compose files.
Packit 5bd3a9
.TP
Packit 5bd3a9
.I $HOME/.compose-cache/
Packit 5bd3a9
Per-user cache directory for compiled compose files.
Packit 5bd3a9
.SH SEE ALSO
Packit 5bd3a9
.BR XLookupString (__libmansuffix__),
Packit 5bd3a9
.BR XmbLookupString (__libmansuffix__),
Packit 5bd3a9
.BR XwcLookupString (__libmansuffix__),
Packit 5bd3a9
.BR Xutf8LookupString (__libmansuffix__),
Packit 5bd3a9
.BR mkcomposecache (__appmansuffix__),
Packit 5bd3a9
.BR locale (__miscmansuffix__).
Packit 5bd3a9
.br
Packit 5bd3a9
\fI\*(xL\fP