Archive:Input methods: Difference between revisions

From The Toaq Wiki
(backup thingy, also, experiment lets see if visual editor works here.)
(No difference)

Revision as of 15:42, 14 December 2022

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.)

vim

Copy the contents below into a file called toaq.vim inside a folder named keymap in your .vim directory (create it if it doesn’t exist). Then, in insert mode, you may use any of the two-keystroke “combinations” and have them replaced with accented letters on the fly. (See :help mbyte-keymap for more detailed information.)

Toaq vim keymap
" toaq keymap
" by uakci on 2022-06-23
scriptencoding utf8
let b:keymap_name = "toaq"
loadkeymap
.i	i
i	ı
//	/
''	'
\"\"	\"
::	:
??	?
^^	^
``	`
\\\\	\\
~~	~
..	.
.<	«
.>	»
.{	‹
.}	›
./	́
.'	́
."	̈
.:	̈
.?	̉
.^	̂
.`	̀
.\	̀
.~	̃
/A	Á
/U	Ú
/I	Í
/O	Ó
/E	É
/Y	Ý
/a	á
/u	ú
/i	í
/o	ó
/e	é
/y	ý
'A	Á
'U	Ú
'I	Í
'O	Ó
'E	É
'Y	Ý
'a	á
'u	ú
'i	í
'o	ó
'e	é
'y	ý
\"A	Ä
\"U	Ü
\"I	Ï
\"O	Ö
\"E	Ë
\"Y	Ÿ
\"a	ä
\"u	ü
\"i	ï
\"o	ö
\"e	ë
\"y	ÿ
:A	Ä
:U	Ü
:I	Ï
:O	Ö
:E	Ë
:Y	Ÿ
:a	ä
:u	ü
:i	ï
:o	ö
:e	ë
:y	ÿ
?A	Ả
?U	Ủ
?I	Ỉ
?O	Ỏ
?E	Ẻ
?Y	Ỷ
?a	ả
?u	ủ
?i	ỉ
?o	ỏ
?e	ẻ
?y	ỷ
^A	Â
^U	Û
^I	Î
^O	Ô
^E	Ê
^Y	Ŷ
^a	â
^u	û
^i	î
^o	ô
^e	ê
^y	ŷ
`A	À
`U	Ù
`I	Ì
`O	Ò
`E	È
`Y	Ỳ
`a	à
`u	ù
`i	ì
`o	ò
`e	è
`y	ỳ
\\A	À
\\U	Ù
\\I	Ì
\\O	Ò
\\E	È
\\Y	Ỳ
\\a	à
\\u	ù
\\i	ì
\\o	ò
\\e	è
\\y	ỳ
~A	Ã
~U	Ũ
~I	Ĩ
~O	Õ
~E	Ẽ
~Y	Ỹ
~a	ã
~u	ũ
~i	ĩ
~o	õ
~e	ẽ
~y	ỹ

Alternatively, for sporadic usage, you can enter Toaq characters using Ctrl+K followed by two keys: (see :help digraph)

Character Combo
rising tone Ctrl+K vowel '
rising-creaky tone Ctrl+K vowel :
falling tone Ctrl+K vowel 2
rising-falling tone Ctrl+K vowel >
mid-falling tone Ctrl+K vowel `
falling creaky tone Ctrl+K vowel ?
dotless i (ı) Ctrl+K . i
left quote («) Ctrl+K < <
right quote (») Ctrl+K > >

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!

US, intl. with dead keys

If you are on Linux, there is a keyboard option called "US, intl. with dead keys". The way you enter diacritics is the same as the compose key one except falling tone is AltGr Shift ? and you don't need to hit the compose key.

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.

Mıao has made a slightly modified version of thad keyboard. Since flat tone is no longer a thing, this layout moves it to the end of the list. It also adds back the old falling-rising tone (obsolete 3rd tone) if needed (except for "y" because it doesn't exist). falling tone is the most common tone, so it also moves it to the front.

Mıao's modified layout
OK_Layout_Begin
Name:Tóaqzu
1234567890
qw[XK:eẻéëêèẽēě]rt[XK:yỷýÿŷỳỹȳ][XK:uủúüûùũūǔ][XK:ıỉíïîìĩīǐi][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

uakci’s mobile-optimized variant

This layout has fewer keys, which makes it easy to use for the butterfingered among us. Hold-tap to get falling tone.

uakci’s mobile-optimized layout
OK_Layout_Begin
Name:uakci’s mobile-optimized layout
´¨̉«»ˆˋ˜
[XK:eẻ]rt[XK:yỷ][XK:uủ][XK:ıỉ][XK:oỏ]p
q[XK:aả]sdhjkl
zcfgbnm

[XK:EẺ]RT[XK:YỶ][XK:UỦ][XK:IỈ][XK:OỎ]P
Q[XK:AẢ]SDHJKL
ZCFGBNM
OK_Layout_End

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

uakci’s flick-based variant

uakci’s flick-based layout
OK_Layout_Begin
Name:uakci’s flick-based layout

sdfgcjkl
q[4D:aãáâảàäǎā][4D:uũúûủùüǔū][4D:ıĩíîỉìïǐī]h[4D:oõóôỏòöǒō][4D:eẽéêẻèëěē]y
zrtbnm

SDFGCJKL
Q[4D:AÃÁÂẢÀÄǍĀ][4D:UŨÚÛỦÙÜǓŪ][4D:IĨÍÎỈÌÏǏĪ]H[4D:OÕÓÔỎÒÖǑŌ][4D:EẼÉÊẺÈËĚĒ]Y
ZRTBNM
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 (although reader-hostile) /"?^\~ 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.

Refrain from using Vietoaq in any setting at all. If you must, please use #Kảıchuo to convert it to a reader-friendly form.