The compose file is searched for in the following order:
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 "/usr/share/X11/locale/iso8859-1/Compose"
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., "/usr/share/X11/locale/<localename>/Compose").
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.
EVENT [EVENT...] : RESULT [# COMMENT]
Each event consists of a specified input keysym, and optional modifier states:
[MODIFIER_LIST] <keysym>
Each modifier consists of a specified modifier and a state:
(! MODIFIER ) | NoneModifiers 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:
"STRING" | keysym | "STRING" keysym
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 hexadecimal 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" Agravethe result of the composition is always the letter with the "\300" code. But if the rule is:
<dead_grave> <A> : Agravethe result depends on how Agrave is mapped in the current locale.