A Swype Virtual Keyboard for Javascript

Many of us may have used or heard about the Swype Keyboard app for Android phones. Personally, I was never good at it – but seeing others swipe on it at blazing speeds was pretty impressive.

 

 

As years passed by, the Swype Keyboard ended up being discontinued by it’s developer. The need for something like it was not lost however. Last week, I came across a post from LabOfOz, where he’s implementing my Javascript virtual keyboard, “simple-keyboard“, as an input device for his HandsfreeJS project.

 

© LabOfOz

 

As Oz points out in the article, a Swype style keyboard might be a better fit for head-controlled mouse pointers. I set out to find something like this for Javascript, yet wasn’t able to find anything like it.

 

A Swype keyboard for Javascript

I set out to build swipe-keyboard as a module for simple-keyboard. It was a bit of a challenge, since the Swype keyboards’ secret sauce is in the text prediction. Swipe-keyboard is a nice fit for simple-keyboard though, as the functionality is more simplistic in nature. Indeed, it only triggers a button press when the pointer is resting or does a sharp turn. The result is fair enough!

 

 

To make up somehow for the lack of type prediction AI, I created an autocorrect module for simple-keyboard, named.. simple-keyboard-autocorrect.

Here’s the result of both these modules combined:

 

 

What do you think of the result? If you feel something could be improved, do let me know here or on the swipe-keyboard repo on GitHub.

Share your thoughts