KTRANS(1)KTRANS(1)
NAME
ktrans – language transliterator
SYNOPSIS
DESCRIPTION
ctl-t and en
ctl-n and jp
ctl-k and jpk
ctl-c and zh
ctl-s and ko
ctl-v and vn
CONVERSION
Conversion is done in two layers, an implicit layer for unambiguous mappings, and an explicit layer for selecting one match out of a list of ambiguous matches. The following control characters are used for conversion instructions.
Explicitly match the current input, consecutive inputs of ctl-\ will cycle through all the possible options.
Reset the current input buffer.
The implicit layer happens automatically as characters
are input, transforming a consecutive set of key strokes
in to their rune counterpart. A series of runes may then
be explicitly matched by cycling through a list of options.
Input is always passed along, when a match is found
DISPLAY
The
KEY MAPPING
For convenience, the control characters used by
Convert to Kanji (ctl-\)
Clear Kanji buffer (ctl-l)
Switch to Hiragana (ctl-n)
Switch to Katakana (ctl-k)
Switch to Hiragana (ctl-n)
Switch to passthrough (ctl-t)
Convert to Kanji (ctl-\). This is a fallback for keyboards without a physical Henkan key.
DICTIONARIES
All implicit and explicit matching dictionaries are provided as plain
text files within
For backwards compatibility the
LANGUAGES
JAPANESE
The Hiragana and Katakana modes implicitly turn Hepburn representations in to their Kana counterparts. Explicit conversions combine sequences of Hiragana in to Kanji.
Capital Latin input is used for hinting. For adjectives and verbs, a single capital is used as an Okurigana hint. For example, 動かす is typed as ’ugoKasu[^\]’. The hint serves two purposes, it is provided as part of the explicit sequence for Kanji lookup and denotes that the following runes are Okurigana.
For particles, the entire Kana may be input in upper case. This similarly denotes the end of the Kanji portion of the sequence, but is not used as part of the lookup sequence itself. So to write 私の猫 the user types "watashiNO[^\]neko[^\]". Note that in both cases we have successfully communicated to ktrans when to reset the explicit match buffer without needing to explicitly give a ctl-l character.
CHINESE
Implicit conversion converts punctuation. Explicit matches use a dictionary to convert a series of Latin characters into Hanzi. By default a Wubizixing input dictionary is used. Additionally a Pinyin input dictionary is provided.
VIETNAMESE
Implicit conversion is modeled after Telex, supporting standard diacritic suffixes.
KOREAN
Mapping is done by emulating a Dubeolsik layout, with each Latin character mapping to a single Jamo. Sequences of Jamo are automatically converted to Hangul syllables.
EXAMPLES
To type the following Japanese text:
私は毎日35分以上歩いて、 更に10分電車に乗って学校に通います。 健康の維持にも役だっていますが、 なかなかたのしいものです。
your keyboard typing stream should be:
watashiHA[^\]mainichi[^\]35[^l]fun[^\]ijou[^\]aruIte,[^\] saraNI[^\]10[^l]fun[^\]denshaNI[^\]noTte[^\]gakkouNI[^\] kayoImasu.[\n]kenkouNO[^\]ijiNImo[^\]yakuDAtteimasuga,[^\] nakanakatanoshiImonodesu.[\n]
where [^\] and [^l] indicate ’ctl-\’ and ’ctl-l’, respectively.
SOURCE
SEE
BUGS
There is no hint from rio when the user moves the cursor, as such moving it is unlikely to result in what the user expects.
Plan 9 lacks support for rendering combinational Unicode sequences, limiting the use of some code ranges.
HISTORY
Ktrans was originally written by Kenji Okamoto in August of 2000 for the 2nd edition of Plan 9. It was imported in to 9front in July of 2022, with patches by several contributors. It was towed inside the environment during the 2022 9front hackathon.