ref: d86a7ed412555192e2000a9a34b3372f380ec3d0
dir: /sys/man/1/ktrans/
.TH KTRANS 1 .SH NAME ktrans \- language transliterator .SH SYNOPSIS .B ktrans [ .B -t .I kbdtap ] [ .B -l .I lang ] .SH DESCRIPTION .I Ktrans provides a transliteration layer to keyboard input through reads and writes to .BR /dev/kbdtap . The .B -t flag changes the .I kbdtap file used. The .B -l flag changes the initial language. .SH CONVERSION Conversion is done in two steps: An implicit layer that is used for direct mappings between ascii characters and an explicit multi rune conversion used for compound mappings. .I Ktrans does implicit conversion by passing through characters as they are input. Then when a sequence of input is matched, backspaces are emitted to clear the input sequence and the matched rune sequence is emitted. The last 'word' of input may be then explicitely transliterated by typing ctrl-\\. A newline character also performs this lookup, but additional newline characters will not cycle through alternatives. .SH CONTROL The language is selected by typing a control character: .TP .B ctl-t Passthrough mode .TP .B ctl-n Japanese mode. Implicit layer converts hepburn sequences to hiragana. Explicit layer converts sequences of hiragana with optional trailing particle or okurigana. .TP .B ctl-k Implicit only Japanese Katakana layer. .TP .B ctrl-c Chinese Wubi mode. No implicit conversion is done. Explicit layer converts sequences of latin characters to hanzi. .TP .B ctl-l Clear the explicit layer's current input sequence. .TP .B ctl-r Russian mode. Implicit layer converts latin to Cyrillic; the transliteration is mostly phonetic, with .B ' for .IR myagkij-znak (ь), .B '' for .I tverdyj-znak (ъ) .I yo for ё, .B j for .IR i-kratkaya (й). .TP .B ctl-o Greek mode. .TP .B ctl-s Korean mode. Implicit layer converts latin to Korean Hangul. .SH SOURCE .B /sys/src/cmd/ktrans .SH SEE ALSO .IR rio (4) .IR kbdfs (8) .br .IR /sys/src/cmd/ktrans/README.kenji .br .IR /sys/src/cmd/ktrans/READMEJ.kenji .SH EXAMPLES To type the following Japanese text: .ft Jp 私は毎日35分以上歩いて、 更に10分電車に乗って学校に通います。 健康の維持にも役だっていますが、 なかなかたのしいものです。 .ft 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. See README.kenji for the details of this Japanese input method. .SH BUGS .PP There is no way to generate the control characters literally. .SH 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.