The goal of this project is to materialize a well-styled, onscreen keyboard capable of supporting numerous languages fed from .klc files generated by Microsoft Keyboard Layout Creator. This has proven to be the most-reliable source of unicode data along with dead keys and ligature support but I am willing to make revisions if a better source is found. Typical use cases for this application include terminals, kiosks, and other touch-point devices. I hope to provide the community with a valuable resource that only grows better with time and your support!
Why Build It?
At one point in my career, I found myself creating multilingual kiosk applications. There were plenty of jQuery keyboard plugins available, but none seemed to be as robust as I’d like. More importantly, why don’t any of them support ALL languages? I’m passionate about spoken languages and wanted to provide developers a way to allow them to ship their applications with native keyboards.
The concept was simple – somehow generate a list of every keyboard layout and write some logic to parse and display it.
How's It Work?
Photo by Peter Pryharski via Unsplash
Usage is quite straightforward. This project exposes a simple jQuery plugin which can either be directly imported into the project or served from a script tag pointed at the CDN, jsDelivr. When initializing the project, users specify their desired languages. If they’re not found locally, the plugin simply fetches the appropriate version-controlled language from the CDN.
How's It Built?
How do you generate 99 keyboard layouts? Fortunately, I was lucky. I discovered I had the ability to export language flat files from a utility called Microsoft Keyboard Layout Creator. From there, I started the arduous process of coding the “processing engine”. This engine consisted of a complex regular expression along with all rules required in written languages.
At first, the concept seems simple – or at least it did to me as an English speaker. The user touches a key and we write that to the focused field. Simple enough… I quickly discovered previously-unknown words such as ligature and deadkeys. These required the plugin to watch for, and interpret, combinations of keys such as
a + ` = à or
a + e = æ.
Photo by Author
Is It Used?
Despite jQuery losing popularity over the years, this keyboard has seen incredible growth! This keyboard has presented me with the fantastic opportunity of connecting with developers around the world. I’ve since coordinated with developers on every inhabited continent. I’ve fielded numerous enhancement requests and bugs. As I view the usage statistics, I’ve been so thrilled to see its usage with languages and layouts I never even knew existed!