diff options
author | Jacob Moody <moody@posixcafe.org> | 2022-08-15 03:45:42 +0000 |
---|---|---|
committer | Jacob Moody <moody@posixcafe.org> | 2022-08-15 03:45:42 +0000 |
commit | 69352f66684cbc75e2cd68c80cd028324964c5aa (patch) | |
tree | fd31d2a76fef40da1415138d154e9c68955a183e /sys/man/1 | |
parent | 79c1842979b5c5579bb0db41861d63f5562c85f1 (diff) |
ktrans: tow inside the environment
Diffstat (limited to 'sys/man/1')
-rw-r--r-- | sys/man/1/ktrans | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/sys/man/1/ktrans b/sys/man/1/ktrans new file mode 100644 index 000000000..a5acd1125 --- /dev/null +++ b/sys/man/1/ktrans @@ -0,0 +1,117 @@ +.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. |