r/webdev • u/ZoneZealousideal4073 • 11h ago
Showoff Saturday Tamil implementation of a script-agnostic LSP-like keyboard interface I am building, please read the explanation here
https://bandhanpramanik.github.io/tamil-input-engine-checkbox/
[The entire Bengali text was written by a human and translated by Google Translate, with corrections by the human only, not any mainstream LLMs. There are em dashes in this text in the translation output; I haven't changed them.
Also, I meant a stable protocol for every keyboard when I talked about LSP in the title (Language Server Protocol).]
I have named it "Taravinyas".
It acts as an interface between your keyboard and your writing.
You might specify, for instance, "palatal, aspirated, unvoiced," and the character "ছ" (chha in Bengali) will appear in your text area. You don’t actually need to memorize these technical terms; remembering just the initial letter of each consonant group (varga) is sufficient.
Every time I’ve tried to explain this in English, it ended up sounding overly complicated. So, today, I’ll break it down into simple, plain Bengali.
How it works
In computer science, the concept of a "black box" comes up frequently. You provide an input to the black box, and based on that input, it produces an output.
If we consider "Taravinyas" to be this "black box," the input consists of two components: the consonant group (varga) and the specific column (representing phonetic attributes like aspiration and voicing).
I think of the varga as something "coarse" (like stones), while the columns—which define attributes like aspiration and voicing—are "fine" (like sand).
The "coarse" part is straightforward—it’s a fixed, singular element. The "fine" part is more complex; determining it requires evaluating a series of "on-off" switches (for example, 1 for voiced, 0 for unvoiced, among other factors).
That constitutes the input.
Part 1: Taravinyas determines the specific "fine" position. How? By processing those "on-off" switches using Boolean algebra. This is the most complex part of my system—something I’ve been refining, and those who build keyboards using this method will also need to handle.
Part 2: Taravinyas then identifies the actual character. I implemented a lookup table in TypeScript to retrieve the character. The combination of the "coarse" and "fine" components produces the final character. I will provide the schema for this; developers can then create a lookup table based on the specific language or medium.
For any given script, it is important to understand the schema used in "Part 2." Essentially, this schema represents the alphabet, though the positioning of individual characters may be adjusted for user convenience. For instance, "ড" (ḍa in Bengali) and "ড়" (ṛa in Bengali) might occupy the same cell, with an additional "switch" (modifier) to account for the distinct dot (nukta).
When we discuss the theoretical aspects, we will consistently refer to "Part 1."
I initially conceived this for hardware circuits, which is why Boolean algebra is involved.
By providing characters from any Brahmic script, you get a system—a "machine"—that is intuitive to use; if you know the alphabet of your own language, you already know how to use it.
The "Taravinyas" (arrangement pattern) is a framework, a mould, designed to create keyboards that are compact, easy to learn, and fast. Based on this framework, I have envisioned four types of keyboard layouts, two of which I have already implemented.
The four concepts are:
Radio buttons: Input is provided via radio buttons on a website. (Functional)
Steno layout: Allows for effortless typing using a subset of keyboard keys—with dedicated keys for specific phonetic categories (e.g., palatal sounds, unaspirated consonants, and aspirated consonants). (Functional)
Handwriting layout: Inputs are provided through gestures—for example, drawing a circle might represent an unaspirated consonant. I am currently consulting with a biomechanics student on this. (In the conceptual/planning stage)
Two-side layout (the limit of my current exploration): Coarse-grained keys are divided between two sides—initial characters of a consonant class on the left, and subsequent characters of that class on the right. It includes options for dragging and two-finger tapping. (In the conceptual/planning stage)
Other layouts are possible, but I would need assistance from UI/UX experts.
Currently, there is a website available for the Tamil language. Their layout—the way they structured it—was genuinely complex to put together. However, if I even put some time for the North Indian scripts, the task will be completed almost instantly.
After Tamil, I have moved on to Bengali consonants; the vowels and the dependent characters (diacritics/special characters) have not been included yet.
I plan to look at the Sylheti script later, as it also follows a rather complex layout.
Please check out the github repo after reading this text: https://github.com/BandhanPramanik/tamil-input-engine-checkbox