[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions about Quail

From: James Thomas
Subject: Re: Questions about Quail
Date: Sat, 23 Jul 2022 17:08:53 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)

Visuwesh wrote:

> [சனி ஜூலை 23, 2022] Visuwesh wrote:
>> [சனி ஜூலை 23, 2022] James Thomas wrote:
>>> Visuwesh wrote:
>>>>> Are you sure that you actually need state? Assuming you're using the
>>>>> rules from [1], couldn't you just add a rule for mapping, say, the
>>>>> string "^#12#" to the half fraction?
>>>> Unfortunately, yes.  The problem isn't from the fractions which are
>>>> simple translation rules but from the rules 5, 6 and 7.  See p. 21 from
>>>> the PDF you linked.
>>> Reading rule 5, it seems to me that separate mappings for "h" and "hh"
>>> should do the trick. For rule 6, you could map "ha" also. For 7, map
>>> also all combinations of soft and hard consonants.
>> I considered that but the implementation that I used as a reference was
>> this web one https://wk.w3tamil.com/ which considers not the keystrokes
>> but the character before point.  That made more sense to me as well so I
>> decided to implement these rules in the update-translation function.
> The ibus input method does not care about the character before point, it
> only checks the keystrokes hmm...  I will wait for user feedback™ to
> decide which is better.
>> In that web keyboard, try typing hj (கப) then backspace (க) and type h
>> again: you will get க்க.
> I.e., whilst you get க்க in my input method, you get கக in the ibus
> one.

Hmm. One possible solution (albeit a bit complicated), to get the
non-ibus behaviour, is to use the update-translation-function to never
end a translation that reaches up to the last 2 input characters: ie
keep the input pending (unless the last one is not any of the valid
input characters), and programatically insert the translation of any
remaining input character beyond the control-flag.

But that would work for only one level of backspace. If you have a
simpler implementation with the use of state (or checking the character
before point directly?) that might be better.

> I did a very quick test of tamil99 keyboard layout in MS Windows 10 (I
> think) and it does what I do i.e., consider the character before point
> rather than the keystrokes.  So the implementation varies a lot and
> everyone decides for themselves what the best choice is so I will too. :P

OK. :)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]