That's good, but...
> However, one major issue that I'm still facing with this input system is
> that the consonants do not merge with the three pre-base matras (i.e.: "ি"
> Unicode - 0x09BF, "ে" Unicode - 0x09C7 and "ৈ" Unicode - 09C8) in a manner
> that is expected.
So, you want to type in visual order and produce characters
in logical (i.e Unicode) order. Then, your code is wrong in
its basic logic. I think you must read this page again:
http://www.m17n.org/common/m17n-docs-en/m17nDBFormat.html#mdbIMAnyway, as it will result in a looong mail to point out each
wrong part in your code, instead, I attach a working
code. With it, when you type "{k", "কি" is produced, which
I think is what you want.
It doesn't handle such two-part vowels as "ো" and "ৌ".
In visual order input, I think users want to input "কো" by
typing keys corresponding to "ে", "ক", "া" respectively in
that order, right? But it requires a little bit more
complicated logic in the code. If such a functionality is
surely necessary, its your homework. :-p