diff options
author | Jacob Moody <moody@posixcafe.org> | 2022-10-09 22:26:09 +0000 |
---|---|---|
committer | Jacob Moody <moody@posixcafe.org> | 2022-10-09 22:26:09 +0000 |
commit | 88b9bda96cc4188f12713c2f5cb089f13bc8d368 (patch) | |
tree | 43465160784e09afcf17459eb5a05d46fff0fb91 /sys/man/1 | |
parent | a3f3953ab2f245cd47aab3563014c04f1a70f9be (diff) |
ktrans: gui and man page rework
Graphical display shows current candidate list.
Diffstat (limited to 'sys/man/1')
-rw-r--r-- | sys/man/1/ktrans | 137 |
1 files changed, 97 insertions, 40 deletions
diff --git a/sys/man/1/ktrans b/sys/man/1/ktrans index 99b6b4039..f2c246264 100644 --- a/sys/man/1/ktrans +++ b/sys/man/1/ktrans @@ -4,6 +4,9 @@ ktrans \- language transliterator .SH SYNOPSIS .B ktrans [ +.B -G +] +[ .B -l .I lang ] @@ -21,46 +24,101 @@ If a .I kbdtap file is given, it is used for both input and output instead. +.I Ktrans +starts in a passthrough mode, echoing out +the input with no conversions. Control characters +are used to give instructions, the following +control sequences are used to switch between languages: +.TP +.B ctl-t +English (Passthrough). +.TP +.B ctl-n +Japanese Hiragana. +.TP +.B ctl-k +Japanese Katakana. +.TP +.B ctl-c +Chinese. +.TP +.B ctl-r +Russian. +.TP +.B ctl-o +Greek. +.TP +.B ctl-s +Korean. +.TP +.B ctl-v +Vietnamese. .SH 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. +ambigious matches. The following control characters +are used for conversion instructions. +.TP +.B ctl-\e +Explicitely match the current input, consecutive inputs of ctl-\e +will cycle through all the possible options. +.TP +.B ctl-l +Reset the current input buffer. .PP 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. +in to their rune counterpart. A series of runes may then +be explicitely matched by cycling through a list of options. +.I Ktrans +automatically maintains a buffer of the current series of +key strokes being considered for an explicit match, and resets +that buffer on logical "word" breaks depending on the language. +However manual hints of when to reset this buffer will likely +still be required. .PP Input is always passed along, when a match is found .I Ktrans will emit backspaces to clear the input sequence and replace it with the matched sequence. -.SH CONTROL -The language is selected by typing a control character: -.TP -.B ctl-t -Passthrough mode +.SH DISPLAY +.I Ktrans +will provide a graphical display of current explicit conversion +candidates as implicit conversion is done. Candidates are highlighted +as a user cycles through them. At the bottom of the list is an exit +button for quiting the program. Keyboard input typed in to the window is +transliterated but discarded, providing a scratch input space. The +.B -G +option disables this display. +.SH JAPANESE +The Hiragana and Katakana modes implicitly turn hepburn representations +in to their Kana counterparts. Explicit conversions combine sequences +of Hiragana in to Kanji. +.PP +The +.B /sys/lib/kbmap/jp +keyboard map will turn the language input keys +present on OADG 109(A) keyboards in to control +sequences matching their label: .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. +.B Henkan +Convert to Kanji (ctl-\e) .TP -.B ctl-k -Implicit only Japanese Katakana layer. +.B Muhenkan +Clear Kanji buffer (ctl-l) .TP -.B ctrl-c -Chinese Wubi mode. No implicit conversion is done. Explicit layer -converts sequences of latin characters to hanzi. +.B Hiragana / Katakana +Switch to Hiragana (ctl-n) .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 +.B Shift + Hiragana / Katakana +Switch to Katakana (ctl-v) +.SH CHINESE +The Wubizixing input method is used. No implicit conversion is done, +explicit conversion interprets latin characters as their Wubi counterparts +to do lookup of Hanzi. +.SH RUSSIAN +Implicit layer converts latin to Cyrillic; the transliteration is mostly phonetic, with .B ' for @@ -76,15 +134,13 @@ for ё, for .IR i-kratkaya (й). -.TP -.B ctl-o -Greek mode. -.TP -.B ctl-s -Korean mode. Implicit layer converts latin to Korean Hangul. -.TP -.B ctrl-v -Vietnamese Telex input. +.SH VIETNAMESE +Implicit conversion is modeled after Telex, supporting +standard diacritic suffixes. +.SH KOREAN +Mapping is done by emulating a Dubeolsik layout, with each latin +character mapping to a single Jamo. Sequences of up to three Jamo +are automatically converted to Hangul syllables. .SH EXAMPLES To type the following Japanese text: @@ -95,14 +151,13 @@ To type the following Japanese text: 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] +watashiHA[^\e]mainichi[^\e]35[^l]fun[^\e]ijou[^\e]aruIte,[^\e] +saraNI[^\e]10[^l]fun[^\e]denshaNI[^\e]noTte[^\e]gakkouNI[^\e] +kayoImasu.[\en]kenkouNO[^\e]ijiNImo[^\e]yakuDAtteimasuga,[^\e] +nakanakatanoshiImonodesu.[\en] -where [^\\] and [^l] indicate 'ctl-\\' and 'ctl-l', -respectively. See README.kenji for the details of this Japanese input -method. +where [^\e] and [^l] indicate 'ctl-\e' and 'ctl-l', +respectively. .SH SOURCE .B /sys/src/cmd/ktrans .SH SEE ALSO @@ -115,6 +170,8 @@ method. .SH BUGS .PP There is no way to generate the control characters literally. +Plan9 lacks support for rendering combinational Unicode sequences, +limiting the use of some code ranges. .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 |