[prev in list] [next in list] [prev in thread] [next in thread]
List: opensolaris-i18n-discuss
Subject: [i18n-discuss] man page for Xlib compose files
From: Alan Coopersmith <Alan.Coopersmith () Sun ! COM>
Date: 2009-10-23 7:18:10
Message-ID: 4AE158B2.9000306 () sun ! com
[Download RAW message or body]
Between getting various questions about the format of libX11's compose
files and having to go dig through the source to figure things out too
many times, I finally wrote a quick man page for the Xlib compose files.
I've already submitted it upstream, but if anyone has corrections,
suggested improvements, etc. let me know - it's easy to change.
nroff format:
http://cgit.freedesktop.org/xorg/lib/libX11/tree/man/Compose.man
A plain text output is attached for easier reading.
--
-Alan Coopersmith- alan.coopersmith@sun.com
Sun Microsystems, Inc. - X Window System Engineering
["Compose.txt" (text/plain)]
File Formats Compose(4)
NAME
Compose - X client mappings for multi-key input sequences
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.
The compose file is searched for in the following order:
- If the environment variable $XCOMPOSEFILE is set, its
value is used as the name of the Compose file.
- If the user's home directory has a file named ._X_C_o_m_-
_p_o_s_e, it is used as the Compose file.
- The system provided compose file is used by mapping the
locale to a compose file from the list in
/_u_s_r/_X_1_1_R_7/_s_h_a_r_e/_X_1_1/_l_o_c_a_l_e/_c_o_m_p_o_s_e._d_i_r.
Compose files can use an "include" instruction. This allows
local modifications to be made to existing compose files
without including all of the content directly. For example,
the system's iso8859-1 compose file can be included with a
line like this:
include "/_u_s_r/_X_1_1_R_7/_s_h_a_r_e/_X_1_1/_l_o_c_a_l_e/_i_s_o_8_8_5_9-_1/_C_o_m_p_o_s_e"
There are two substitutions that can be made in the file
name of the include instruction. %_H expands to the user's
home directory (the $HOME environment variable), and %_L
expands to the name of the locale specific Compose file
(i.e., "/_u_s_r/_X_1_1_R_7/_s_h_a_r_e/_X_1_1/_l_o_c_a_l_e/<_l_o_c_a_l_e_n_a_m_e>/_C_o_m_p_o_s_e").
For example, you can include in your compose file the
default Compose file by using:
include "%L"
and then rewrite only the few rules that you need to change.
New compose rules can be added, and previous ones replaced.
FILE FORMAT
Compose files are plain text files, with a separate line for
each compose sequence. Comments begin with # characters.
Each compose sequence specifies one or more events and a
resulting input sequence, with an optional comment at the
end of the line:
_E_V_E_N_T [_E_V_E_N_T...] : _R_E_S_U_L_T [# \
_C_O_M_M_E_N_T]
Each event consists of a specified input keysym, and
optional modifier states:
[_M_O_D_I_F_I_E_R__L_I_S_T] <_k_e_y_s_y_m>
SunOS 5.10 Last change: __vendorversion__ 1
File Formats Compose(4)
Each modifier consists of a specified modifier and a state:
(! _M_O_D_I_F_I_E_R ) | None
Modifiers may be preceded by a "~" character to indicate that
the modifier must not be present.
The result specifies a string, keysym, or both, that the X
client receives as input when the sequence of events is
input:
"_S_T_R_I_N_G" | _k_e_y_s_y_m | "_S_T_R_I_N_G" \
_k_e_y_s_y_m
Keysyms are specified without the XK_ prefix.
Strings may be direct text encoded in the locale for which
the compose file is to be used, or an escaped octal or hexa-
decimal character code. Octal codes are specified as "\123"
and hexadecimal codes as "\0x123a". It is not necessary to
specify in the right part of a rule a locale encoded string
in addition to the keysym name. If the string is omitted,
Xlib figures it out from the keysym according to the current
locale. I.e., if a rule looks like:
<dead_grave> <A> : "\300" Agrave
the result of the composition is always the letter with the
"\300" code. But if the rule is:
<dead_grave> <A> : Agrave
the result depends on how Agrave is mapped in the current
locale.
ENVIRONMENT
XCOMPOSEFILE
File to use for compose sequences.
XCOMPOSECACHE
Directory to use for caching compiled compose files.
FILES
$_H_O_M_E/._X_c_o_m_p_o_s_e
User default compose file if XCOMPOSEFILE is not set.
/_u_s_r/_X_1_1_R_7/_s_h_a_r_e/_X_1_1/_l_o_c_a_l_e/_c_o_m_p_o_s_e._d_i_r
File listing the compose file path to use for each
locale.
/_u_s_r/_X_1_1_R_7/_s_h_a_r_e/_X_1_1/_l_o_c_a_l_e/<_l_o_c_a_l_e_m_a_p_p_i_n_g>/_C_o_m_p_o_s_e
System default compose file for the locale, mapped via
compose.dir.
/_v_a_r/_c_a_c_h_e/_l_i_b_x_1_1/_c_o_m_p_o_s_e/
System-wide cache directory for compiled compose files.
$_H_O_M_E/._c_o_m_p_o_s_e-_c_a_c_h_e/
Per-user cache directory for compiled compose files.
SunOS 5.10 Last change: __vendorversion__ 2
File Formats Compose(4)
SEE ALSO
XLookupString(3), XmbLookupString(3), XwcLookupString(3),
Xutf8LookupString(3), mkcomposecache(1), locale(5).
_X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
SunOS 5.10 Last change: __vendorversion__ 3
_______________________________________________
i18n-discuss mailing list
i18n-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/i18n-discuss
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic