m17n-list
[Top][All Lists]
Advanced

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

Re: Request to add a new layout for Malayalam


From: Ajith R
Subject: Re: Request to add a new layout for Malayalam
Date: Tue, 7 Nov 2023 08:47:46 +0000 (UTC)

Dear Mike


Thanks for all your help. I have incorporated almost all features that I wanted 
in the layouts. The feature that is not implemented is automatic vowel changes 
after using delete or after moving cursor.


Even in bn-national-jatiya.mim, this is not working as I would want. For 
example,
if I press    h    I get আ
if I press    l    I get দ
if I press    lh    I get দা


Till now everything is as I want. Suppose now,
if I press    lh, then the backspace and then    h, I get    দআ and not দা 


It will take time before I can go through the mim files to see if something 
similar to what I want is implemented somewhere. So, please go ahead and 
include the current versions of the layouts which are attached and uploaded to 
gitlab repository.


There is a problem with using the layouts with browsers - they don't work 
sometimes. I am not sure what triggers the non conversions. You probably can 
recreate the problems by using my pn-eqf layout to enter the password to the 
web interface of gitlab. When the passwords are invisible, the ibus conversion 
doesn't happen. If you show the password (by pressing the eye button), you can 
see that ibus conversions did not happen. If you type after showing the 
password, the conversion happens as expected. Note that the pn-eqf works as 
expected if I type into a desktop app like a text editor. I have tried it in 
two browsers - firefox and falkon. Both show the same error.


In addition, in falkon, ibus restart (after modifying the mim file) did not 
show the changes unless it is closed and reopened. Ibus conversion didn't also 
work in yahoo mail web interface for composing a mail using falkon. However, it 
appears that installing m17n-lib-bin solved that problem. However, the password 
problem still persists.




I am using debian testing. The package versions are - 


ibus/testing,now 1.5.29~rc1-1 amd64 [installed,automatic]
ibus-m17n/testing,now 1.4.22-1 amd64 [installed]
m17n-db/testing,now 1.8.4-1 all [installed,automatic]
m17n-lib-bin/testing 1.8.4-1 amd64
falkon/testing,now 23.08.2-1 amd64 [installed]
firefox-esr/testing,now 115.3.0esr-1+b1 amd64 [installed,automatic]

Thanks for your time and patience,
Ajith


On Monday, 6 November, 2023 at 03:50:42 pm IST, Mike FABIAN 
<mfabian@redhat.com> wrote: 





Ajith R <ajithramayyan@yahoo.co.in> さんはかきました:

> 3) I also want the vowel keys to form the vowel signs when they are
> pressed after a consonant (or the gemination key I defined). Currently
> vowel signs are formed based on what was typed last. If not
> consonants, vowel letters form. While this is okay, it is not
> ideal. After pressing delete or moving the cursor, it will not provide
> vowel
> signs. Does 
> https://git.savannah.nongnu.org/cgit/m17n/m17n-db.git/tree/MIM/bn-national-jatiya.mim
> implement such a logic? Could you explain it a bit?


bn-national-jatiya.mim has a variable use-automatic-vowel-forming which
is set to 1 by default. If use-automatic-vowel-forming is 1 and one
types `a` **not** after a consonant then one gets:

ঋ U+098B BENGALI LETTER VOCALIC R

But if one types this `a` after a consonant, for example `ka` one gets:

তৃ which is ত U+09A4 BENGALI LETTER TA + ৃ U+09C3 BENGALI VOWEL SIGN VOCALIC R

If the variable use-automatic-vowel-forming is 0, then typing `a`
**always** gives

ৃ U+09C3 BENGALI VOWEL SIGN VOCALIC R

no matter whether it is typed after a consonant or not. 

It works basically like this:

In the beginning, the consonant-flag is set to 0 if
automatic-vowel-forming is 1, if not consonant-flag is set to 1 (because
in that case the behaviour is always as if a consonant had been there):

(state
(init
  (t (cond
      ((= use-automatic-vowel-forming 1) (set consonant-flag 0))
      (1 (set consonant-flag 1))))

If a consonant is typed, consonant-flag is set to 1 and it shifts to the
after-consonant:

(consonants (set consonant-flag 1) (shift after-consonant))

The maps dependent-vowel-signs and
additional-dependent-vowel-signs-for-sanskrit check the value of
consonant-flag and behave differently depending on that value:

(dependent-vowel-signs
  ("h" (cond ((= consonant-flag 0) "আ")    ; U+0986 BENGALI LETTER AA
            ((= consonant-flag 1) "া")))  ; U+09BE BENGALI VOWEL SIGN AA
  ("d" (cond ((= consonant-flag 0) "ই")    ; U+0987 BENGALI LETTER I
            ((= consonant-flag 1) "ি")))  ; U+09BF BENGALI VOWEL SIGN I
  ("D" (cond ((= consonant-flag 0) "ঈ")    ; U+0988 BENGALI LETTER II
            ((= consonant-flag 1) "ী")))  ; U+09C0 BENGALI VOWEL SIGN II
  ("s" (cond ((= consonant-flag 0) "উ")    ; U+0989 BENGALI LETTER U
            ((= consonant-flag 1) "ু")))  ; U+09C1 BENGALI VOWEL SIGN U
  ("S" (cond ((= consonant-flag 0) "ঊ")    ; U+098A BENGALI LETTER UU
            ((= consonant-flag 1) "ূ")))  ; U+09C2 BENGALI VOWEL SIGN UU
  ("a" (cond ((= consonant-flag 0) "ঋ")    ; U+098B BENGALI LETTER VOCALIC R
            ((= consonant-flag 1) "ৃ")))  ; U+09C3 BENGALI VOWEL SIGN VOCALIC R
  ((G-e) (cond ((= consonant-flag 0) "ৠ")  ; U+09E0 BENGALI LETTER VOCALIC RR
              ((= consonant-flag 1) "ৄ"))) ; U+09C4 BENGALI VOWEL SIGN VOCALIC 
RR
  ("c" (cond ((= consonant-flag 0) "এ")    ; U+098F BENGALI LETTER E
            ((= consonant-flag 1) "ে")))  ; U+09C7 BENGALI VOWEL SIGN E
  ("C" (cond ((= consonant-flag 0) "ঐ")    ; U+0990 BENGALI LETTER AI
            ((= consonant-flag 1) "ৈ")))  ; U+09C8 BENGALI VOWEL SIGN AI
  ("x" (cond ((= consonant-flag 0) "ও")    ; U+0993 BENGALI LETTER O
            ((= consonant-flag 1) "ো")))  ; U+09CB BENGALI VOWEL SIGN O
  ("X" (cond ((= consonant-flag 0) "ঔ")    ; U+0994 BENGALI LETTER AU
            ((= consonant-flag 1) "ৌ")))  ; U+09CC BENGALI VOWEL SIGN AU
  )

(additional-dependent-vowel-signs-for-sanskrit
  ((G-q) (cond ((= consonant-flag 0) "ঌ")  ; U+098C BENGALI LETTER VOCALIC L
              ((= consonant-flag 1) "ৢ"))) ; U+09E2 BENGALI VOWEL SIGN VOCALIC L
  ((G-Q) (cond ((= consonant-flag 0) "ৡ")  ; U+09E1 BENGALI LETTER VOCALIC LL
              ((= consonant-flag 1) "ৣ"))) ; U+09E3 BENGALI VOWEL SIGN VOCALIC 
LL
  )

I did that to achieve exactly the same behaviour using
bn-national-jatiya.mim as when using the "National Jatiya" layout in
https://github.com/OpenBangla/OpenBangla-Keyboard which has a "Automatic
Vowel Forming" option which behaves exactly like that.

*Maybe* this is similar to what you want. But if this is not exactly
what you want, there are many other .mim files which do quite fancy stuff, it 
might be
usefull to browse the other .mim files to see what is possible. This
lisp language of the .mim files is quite powerful, one can do a lot with that.


-- 
Mike FABIAN <mfabian@redhat.com>
睡眠不足はいい仕事の敵だ。

Attachment: en-pn-eqf.mim
Description: Binary data

Attachment: ml-pn-c.mim
Description: Binary data


reply via email to

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