Input methods

From The Toaq Wiki
Revision as of 14:24, 19 May 2022 by Uakci (talk | contribs) (collapse multiling layout definitions into <details> blocks)

Toaq's Latin writing system features many letter with diacritics, which are tricky to type on a standard keyboard configured for English. Here are some solutions.

Desktop computers

Compose key

You can set up a compose key on your computer, which will change the behavior of one of the keys on your keyboard to "compose" the next two keypresses into one character — for example CapsLock ? a becomes .

On Linux, this might not even involve installing anything! Look for "compose key" plus your distro name.

On Windows, WinCompose is pretty good.

Here's how to type Toaq-specific characters in the default ruleset:

Character Combo
rising tone ' + vowel
rising-creaky tone " + vowel
falling tone ? + vowel
rising-falling tone ^ + vowel
mid-falling tone ` + vowel
falling creaky tone ~ + vowel
dotless i (ı) . + i
left quote («) < + <
right quote (») > + >

Kảıchuo

This is a little tool by User:Lynn that runs in your browser, available here. You type something like Kiai ji kato/ da and it turns it into Kỉaı jí káto da. (Wow! It knows is a pronoun and automatically adds rising tone.)

Yell at her to add mobile support!

AutoHotkey

This official AutoHotkey script will convert a/ into á, etc. Oh, it's actually outdated (has the old falling-rising tone (obsolete 3rd tone) instead of the new rising-creaky tone).

Kanakey

User:Hoaqgio uses a custom Python script that can be found at https://github.com/toaq/kanakey. The way it works is that the script always runs in the background (you start it on login) and when you want to type Toaq, you type alt+; followed by the Toaq you want in the format of "Mai4 ji2 suq2 da.", and finally you just type ; alone. Then the script erases what you typed and replaces it with pretty Toaq. Unfortunately it has two pretty inconvenient issues, one of which is that it currently can't show an icon in the system tray to indicate whether the script is in "listening mode" or not (which means you can accidentally put it in listening mode and leave it there for a while) and the other of which is that if you have non-text data on your system clipboard at the time you try to use the script, it will simply crash. User:Hoaqgio recommends not using this unless you really have no better alternative!

Xmodmap

If you’re running X11 on a Linux machine, create a file (I suggest calling it .Xmodmap in your home directory) with the following contents, then run xmodmap filename to activate:

keycode 11  =  2  at           2  at           dead_acute
keycode 12  =  3  numbersign   3  numbersign   dead_diaeresis
keycode 13  =  4  dollar       4  dollar       dead_hook
keycode 14  =  5  percent      5  percent      dead_circumflex
keycode 15  =  6  asciicircum  6  asciicircum  dead_grave
keycode 16  =  7  ampersand    7  ampersand    dead_tilde
keycode 31  =  i  I            i  I            idotless
Note: You will require your keyboard layout to have a modifier key active (if at all, usually RAlt a.k.a. AltGr); to achieve this, you may run setxkbmap us intl to switch to the international US layout with dead keys. Also note that a layout change wipes any xmodmaps previously issued, so you will have to rerun the xmodmap command. Feel free to add those two commands (in the right order!) to your .xprofile, or whatever other file your system picks up when starting up X11. Contact uakci if you run into issues.

To use: hold RAlt and then press a digit, 2 thru 7. After releasing, press the key for your favourite vowel. This should produce a vowel with the desired precomposed tone diacritic (this is a big deal to some people). For dotless ı, use RAltI.

Variations

Bind the dead diacritic keys to s, d, f, j, k, l (for that sweet sweet ergonomic swag):

keycode 39  =  s  S  s  S  dead_acute
keycode 40  =  d  D  d  D  dead_diaeresis
keycode 41  =  f  F  f  F  dead_hook
keycode 44  =  j  J  j  J  dead_circumflex
keycode 45  =  k  K  k  K  dead_grave
keycode 46  =  l  L  l  L  dead_tilde

Make dotless ı the default when pressing I, requiring RAltI to obtain regular dotted i (and also when composing diacritics with the mechanism described above):

keycode 31  =  i  I  i  I  idotless

Phones

MultiLing O

There's a decently customizable Android custom keyboard app called MultiLing O which comes with a selection of diacritics out of the box (bar falling tone). To use them, first type the desired letter, then hold-tap the key that says ,/AltGr. An alternate screen should appear; without lifting your finger, slide it to the desired choice of diacritic.

Here is a modified QWERTY layout for MultiLing O by SlushieDee on Discord. To use it, select [+DIY] in the list of layouts (accessible by sliding your finger from the spacebar into the top right corner) and paste the following:

SlushieDee’s Toaq layout
OK_Layout_Begin
Name:SlushieDee’s Toaq layout
1234567890
qw[XK:eēéëẻêèẽ]rt[XK:yȳýÿỷŷỳỹ][XK:uūúüủûùũ][XK:ıīíïỉîìĩ][XK:oōóöỏôòõ]p
[XK:aāáäảâàã]sdfghjkl
zxcvbnm
!@#$%^&*()
QW[XK:EĒÉËẺÊÈẼ]RT[XK:YȲÝŸỶŶỲỸ][XK:UŪÚÜỦÛÙŨ][XK:IĪÍÏỈÎÌĨ][XK:OŌÓÖỎÔÒÕ]P
[XK:AĀÁÄẢÂÀÃ]SDFGHJKL
ZXCVBNM
£¥€$₹^&*()№√÷
~`{}%_-=|+§∷‡
@[]#/\'"«»—‐–
…<>!;:?‹›±.,
ˉˋˇ´¨˙˚¸﹐˛˘˜ˆ
―∑éə®†Ωœøπ•·¡
æß∂ðƒ©ªº∆≠℥∞¿
ʒΩ≈çþ∫ŋµ≤≥°
OK_Layout_End

This layout lets you pick diacriticized letters just by hold-tapping the vowel keys.

uakci’s variant

Laid out on an orthogonal 4×10 key grid in accordance with the Colemak keyboard layout, this variant comes with sweet extras like a top bar with diacritic-adding buttons (except for falling tone because tone mark discrimination is a thing in this sad world) and special keys for typographical fancinesses like «». You will want to head into the settings, then Layouts, then check Shift key at bottom to use this layout as intended.

uakci’s Toaq layout (Colemak)
OK_Layout_Begin
Name:uakci’s improved Toaq layout (Colemak)
–‘´¨̉ˆˋ˜’·
qwfpgjl[XK:uūúüủûùũ][XK:yȳýÿỷŷỳỹ];
[XK:aāáäảâàã]rstdhn[XK:eēéëẻêèẽ][XK:ıīíïỉîìĩ][XK:oōóöỏôòõ]
zxcvbkm«i»
~`{}%_-=|+
QWFPGJL[XK:UŪÚÜỦÛÙŨ][XK:YȲÝŸỶŶỲỸ]:
[XK:AĀÁÄẢÂÀÃ]RSTDHN[XK:EĒÉËẺÊÈẼ][XK:IĪÍÏỈÎÌĨ][XK:OŌÓÖỎÔÒÕ]
ZXCVBKM‹I›
OK_Layout_End

QWERTY version:

uakci’s Toaq layout (QWERTY)
OK_Layout_Begin
Name:uakci’s improved Toaq layout (QWERTY)
–‘´¨̉ˆˋ˜’·
qw[XK:eēéëẻêèẽ]rt[XK:yȳýÿỷŷỳỹ][XK:uūúüủûùũ][XK:ıīíïỉîìĩ][XK:oōóöỏôòõ]p
[XK:aāáäảâàã]sdfghjkl;
zxcvbnm«i»
~`{}%_-=|+
QW[XK:EĒÉËẺÊÈẼ]RT[XK:YȲÝŸỶŶỲỸ][XK:UŪÚÜỦÛÙŨ][XK:IĪÍÏỈÎÌĨ][XK:OŌÓÖỎÔÒÕ]P
[XK:AĀÁÄẢÂÀÃ]SDFGHJKL:
ZXCVBNM‹I›
OK_Layout_End

Other options

In general, on many phone keyboards you can long-press a vowel to get some accents, though usually not the falling tone hook. You can install a Vietnamese keyboard layout for that one, and switch between layouts, and suffer. Or use sparse tone marking.

Sad alternatives

ASCII tone markers

You can always write the ASCII-friendly /"?^\~ tone markers after words like this, usefully combined with sparse tone marking:

Hio ka. Bu bo^ ji/ sa gi kaichuo rao\ ni/ da.

Or tone number digits 234567:

Hio ka. Bu bo5 ji2 sa gi kaichuo rao6 ni2 da.

And you will be understood.

Vietoaq

For a bit, a Vietnamese Telex equivalent called Vietoaq was popular, where the idea was to use consonants at the end of a syllable to represent tone.

For example, lé lë lẻ lê lè lẽ is written lep lex len let lek lef.

To make matters worse, léq lëq lẻq lêq lèq lẽq is written, by diehard Vietoaq oldbies, as leb lez lem led leg lev.

This was back when compound words used flat tone, and lē lēq were written ler lel. So, tóaqkūq became toabkul.

Eventually came Diet Vietoaq, which just puts one of pxntkf, marking the tone for the whole word, at the end of the word: tóaqkūq becomes toaqkuqp. In that sense, it is more like the "ASCII tone markers" in the previous section.