Overview
There is a global config file config.inp, which is loaded at
start and which can be used to add declare groups and the locations
for autoloading them, and to declare keyboard sequences (replacements)
for activating/deactivating those groups.
There is one group of special meaning, default. It should
never be deactivated, and contains the global key sequences (for
activating/deactivating the other groups).
A config file must be UTF-8 encoded.
The first line of a config file must begin with
#!/bin/sh international-input-config, otherwise the config file is
not recognised as a valid config file.
Afterward a series of commands, comments or empty lines may follow. A
comment is a line beginning with # (no whitespaces may
precede), an empty line is really empty, not even whitespace is
allowed.
Commands begin with a line containing the command name (something like
=REPLACE), and a number of command specific lines, the
arguments.
Config files to be included in the distribution should follow the
following conventions:
This command does not make sense when supplying autoload for a group
information inside its own config file, the results of such a
behaviour are unspecified.
The current group is ignored by this command.
Example:
Command reference
Command =AUTOLOAD
Command =DESCRIPTION
Command =GROUP
Command =JAVAREPLACE
Command =NAME
Command =REPLACE
Command =REPLACE-NL
Command =SWITCH
Command =WEBPAGE
Example file
Overview
In the International Input applet/application, each input method is
internally represented as a group of replacements, together with some
group properties, like a name. Any number of these groups can be
activated, the first replacement found in any active group is used to
replace the temporary input (longer replacements take precedence, but
if two replacements are of the same length, it is unspecified, which
one will be used).
Config files to be uploaded by the user are freed of these conventions
(the activation/deactivation sequence should however also be of the form @XXX+ resp. @XXX-).Command reference
Command =AUTOLOAD
This command declares a location where to load a given group. It takes
to arguments:
Then, if the group is activated for the first time, or its description is accessed, the config file at
the given location is loaded (unless this has already been done.)=AUTOLOAD
abbrev
example.inp
To be placed in some other config file (e.g. the global one,
config.inp).
Command =DESCRIPTION
This command adds a description to the current
group. This should be a fragment of valid HTML code (without the
surrounding <HTML>, <HEAD> and
<BODY> tags).
The fragment may be several line long, it starts after the line containing =DESCRIPTION and is ended by a line containing only ### (which is not part of the description).
When displaying the description, a title, a link to the config file, and an autogenerated table with all replacements is appended.
Example:
=DESCRIPTION An example input method. Look at the source and be wiser.<p>© Dominique Unruh, 2003, <a href=http://www.fsf.org/licenses/gpl.html target=copy>GPL</a> ###
The second argument may be on, off, or hidden. This sets whether the group is set to be active or inactive. In almost all cases it should be on.
If the second argument is hidden, the group is activated but hidden from the user. It will e.g. not appear in menus, not affect the “Document current” button etc.
Using this command with an argument other than hidden will also create an F-key button for that encoding.
Example:
=GROUP abbrev on
It is followed by at least two lines:
ReplacementFactory,
and one of the constructors documented in ReplacementFactory.InputReplacement.
CodepositionReplacement
in the configs/ directory. This plug-in allows input
sequences like U+1234 for Unicode
code position 0x1234.
ExampleReplacement
in the configs/ directory.
HangulReplacement
in the configs/ directory. This plug-in allows input
sequences like PWILH for Hangul
syllables.
Example:
=JAVAREPLACE configs/ ExampleReplacement aThis loads the
ExampleReplacement
plug-in from configs/ExampleReplacement.class, and creates an
instance with parameter a.
It is followed by two line, first the group's internal name, then the visual name.
The visual name may contain any Unicode characters you trust Java/Swing to display inside a menu using the default font.
The current group is ignored by this command.
If we include this file in the distribution, the name should be set inside the global config file config.inp.
The visual name should be set before the first activation or deactivation of the group, otherwise the F-key buttons will not use that name.
Example:
=NAME abbrev Abbreviations (Сокращения)
Example:
=REPLACE TANSTAAFL There ain't no such thing as a free lunchwill allow to type There ain't no such thing as a free lunch by entering TANSTAAFL.
=REPLACE-NL then behaves as =REPLACE would have done, with the exception, that every occurrence of the newline char in the two strings is replaced by a newline
Example:
=REPLACE-NL !! !:)! !will replace <ENTER><ENTER> by <ENTER>:)<ENTER>.
=SWITCH @abr+ abbrev on =SWITCH @abr- abbrev offThis allows to activate/deactivate the group abbrev using @abr+ and @abr-. When executing this code fragment, the current group should be default, either by switching temporarily to it (using =GROUP), or, better, by placing the code into the global config file.