MAN.9FRONT.ORG RTFM


     KTRANS(1)                                               KTRANS(1)

     NAME
          ktrans - language transliterator

     SYNOPSIS
          ktrans [ -l lang ] [ kbdtap ]

     DESCRIPTION
          Ktrans transliterates a stream of keyboard events. Without
          any arguments, ktrans reads events from standard input and
          writes out converted events to stdout.  If a kbdtap file is
          given, it is used for both input and output instead.

     CONVERSION
          Conversion is done in two layers, an implicit layer for
          unambigious mappings, and an explicit layer for selecting
          one match out of a list of ambigious matches.

          The implicit layer happens automatically as characters are
          input, transforming a consecutive set of key strokes in to
          their rune counterpart. A series of these runes can then be
          explicitely converted using ctrl-\. Consecutive inputs of
          ctrl-\ can then be used to cycle through all the matches. A
          newline may also be used to perform an explicit conversion,
          but will not cycle through other possible matches.

          Input is always passed along, when a match is found Ktrans
          will emit backspaces to clear the input sequence and replace
          it with the matched sequence.

     CONTROL
          The language is selected by typing a control character:

          ctl-t
               Passthrough mode

          ctl-n
               Japanese mode. Implicit layer converts hepburn
               sequences to hiragana. Explicit layer converts
               sequences of hiragana with optional trailing particle
               or okurigana.

          ctl-k
               Implicit only Japanese Katakana layer.

          ctrl-c
               Chinese Wubi mode. No implicit conversion is done.
               Explicit layer converts sequences of latin characters
               to hanzi.

          ctl-l

     KTRANS(1)                                               KTRANS(1)

               Clear the explicit layer's current input sequence.

          ctl-r
               Russian mode. Implicit layer converts latin to Cyril-
               lic; the transliteration is mostly phonetic, with ' for
               myagkij-znak (ь), '' for tverdyj-znak (ъ) yo for ё, j
               for i-kratkaya (й).

          ctl-o
               Greek mode.

          ctl-s
               Korean mode. Implicit layer converts latin to Korean
               Hangul.

          ctrl-v
               Vietnamese Telex input.

     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', respec-
          tively.  See README.kenji for the details of this Japanese
          input method.

     SOURCE
          /sys/src/cmd/ktrans

     SEE ALSO
          rio(4) kbdfs(8)
          /sys/src/cmd/ktrans/README.kenji
          /sys/src/cmd/ktrans/READMEJ.kenji

     BUGS
          There is no way to generate the control characters liter-
          ally.

     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 contribu-
          tors. It was towed inside the environment during the 2022

     KTRANS(1)                                               KTRANS(1)

          9front hackathon.