Subject: bug#58070: [PATCH] Add tamil99 input method

From: Visuwesh <[email-masked]>
Date: Sun, 25 Sep 2022 17:08:50 +0530

[ஞாயிறு செப்டம்பர் 25, 2022] Arun Isaac wrote:

> +(defun tamil99-install ()
> +  "Install tamil99 input method."
> +  (quail-define-rules)
> +  ;; உயிர்
> +  ;; vowel
> +  (mapc (pcase-lambda (`(,vowel-key ,vowel))
> +          (quail-defrule vowel-key vowel))
> +        tamil99-vowels)
> +  (mapc (pcase-lambda (`(,consonant-key ,consonant))
> +          ;; அகர உயிர்மெய்
> +          ;; consonant with agaram (அ)
> +          (quail-defrule consonant-key consonant)
> +          ;; மெய்யொற்று பின் அகர உயிர்மெய்
> +          ;; pulli on double consonant
> +          (quail-defrule (concat consonant-key consonant-key)
> +                         (vector (concat consonant "்" consonant)))
> +          (mapc (pcase-lambda (`(,vowel-key ,vowel-modifier))
> +                  ;; உயிர்மெய்
> +                  ;; vowel+consonant
> +                  (quail-defrule (concat consonant-key vowel-key)
> +                                 (vector (concat consonant vowel-modifier)))
> +                  ;; மெய்யொற்று பின் உயிர்மெய்
> +                  ;; vowel+consonant after double consonant
> +                  (quail-defrule (concat consonant-key consonant-key vowel-key)
> +                                 (vector (concat consonant "்" consonant vowel-modifier))))
> +                tamil99-vowel-modifiers))
> +        tamil99-consonants)
> +  (seq-mapn (pcase-lambda (`(,mellinam-consonant-key ,mellinam-consonant)
> +                           `(,vallinam-consonant-key ,vallinam-consonant))
> +              ;; மெல்லினம் பின் வல்லினம்
> +              ;; vallinam after mellinam
> +              (quail-defrule (concat mellinam-consonant-key vallinam-consonant-key)
> +                             (vector (concat mellinam-consonant "்" vallinam-consonant)))
> +              (mapc (pcase-lambda (`(,vowel-key ,vowel-modifier))
> +                      ;; மெல்லின ஒற்றொட்டிய வல்லினம் பின் உயிர்மெய்
> +                      ;; vowel+consonant after mellinam-vallinam consonant
> +                      (quail-defrule (concat mellinam-consonant-key vallinam-consonant-key vowel-key)
> +                                     (vector (concat mellinam-consonant "்" vallinam-consonant vowel-modifier))))
> +                    tamil99-vowel-modifiers))
> +            tamil99-mellinam-consonants
> +            tamil99-vallinam-consonants)
> +  ;; பிற வரியுருக்கள்
> +  ;; other characters
> +  (mapc (pcase-lambda (`(,key ,translation))
> +          (quail-defrule key translation))
> +        tamil99-other))

Hi, I have a tamil99 keyboard layout in the works as well, and I'm
slowly dogfeeding it whilst also learning the layout.  I use a different
approach to add these special rules: using a UPDATE-TRANSLATION-FUNCTION.
This has the advantage that you can insert the vowel sign for any
consonant out-of-sequence i.e., you can say h j BACKSPACE s
to insert கி (and so do other rules).  WDYT about this approach, is this
feasible?

AFAIK, MS Windows' tamil99 keyboard layout behaves like mine, whereas
the ibus layout behaves like your implementation.  If you are a heavy
user of this layout, can you try out the attached?

The only reason why I haven't submitted a patch so far is because I was
not sure if my implementation wasn't riddled of bugs.