Hi all,
With the direction of Rudy, Greg and John had finished a fast prototype of Dynamic Touch Target[1]. The live video can be found at
http://www.youtube.com/watch?v=eMFfmG8jhRg. We have to admit that it is not a real keyboard but just a demo app. We had demoed it to few people in Taipei, including engineers and UXs. The feedbacks from them are positive about this.
TL;DR
------------
The core algorithm of this dynamic area keyboard is based on Voronoi Diagram. The idea is from a paper called "Touchscreen Software Keyboard for Finger Typing"[2]. In this paper, they used Voronoi diagram to draw the dynamic keyboard, called CATKey, based on touching position. The adaptation of CATKey is made by the user behaviors, see section 3.3. When touching points of a key are moving to left, the keyboard moves its touching area to left. This behavior may be non-intentional. But our version is to predict the next possible keys and enlarge the size of them. We know there are lots ways to improve the accuracy of user input. Our method is to use Voronoi Diagram and word statistics to enlarge the next prossible keys.
The procedures of the dynamic touching target are 1. key prediction, 2. possibility to x-y location for all keys, 3. keys’ position to keys’ polygon, 4. drawing keys’ polygon, 5. touch detecting, 6. learning, and 7. presenting the candidate keys.
1. key dictionary
We didn’t include accurate dictionary in this fast prototype. The dictionary in this version is the statistic of characters based on 4000 frequently used words. In this dictionary, we use a look-up table for each key strike, take "thesis" as an example, we may have "t", "th", "the", "thes", and "thesi" as our key. That is contexual based. Each of them follows by a list of characters with possibility, from 1 to 3. And larger is the higher weight. We did not think this part thoroughly. It’s a fast prototype for proof of concept.
However, this mechanism gives us more opportunities to improve the user experiences under various contexts. It’s even possible to switch the forecasting dictionary when user types in different input element, like the E-mail or URL. Of course, how to build and use the dictionary would always be a serious issue, especially when we must consider it with the performance and accuracy.
2. possibility to x-y location for all keys
We try to use an algorithm as simple as possible to have better performance. In this fast prototype, we just divide the horizontal space for all keys. When a key with higher weight, we add 1 to 3 extra space to them. For example, if user typed th, the ’e’ and ’i’ has the higher possibility to show. We weight ’e’ for 1 and weight ’i’ for 2. And we suppose the horizontal space for the whole keyboard is 320. The original space for each keys at first row, qwertyuiop, is 32 pixel for each. After the weighting, it is divided by 13, including the weight for ’e’ and ’i’, that is 24 pixel for each. But it is 48px for ’e’, and 72px for ’i’. Once we have corresponding size for each key, we need to convert them to the center point. That’s for Voronoi diagram.
3. keys’ position to keys’ polygon
In this prototype, we use d3[4] to calculate the Voronoi diagram for us. It returns a list of polygon points for each key. You may wonder that why not to use the size calculated at step 2 and why we need to run voronoi diagram. The main reason is to have vertical resizing. It looks like a hexagon for each key, originally. Once we change the weight, the vertical size of the hexagon are also affected slightly. If we use rectangle, the outcome may be a rearrangement of horizontal space and no changes on vertical space. As we known, the Voronoi diagram is trying to find the middle perpendicular for two points. With this, the horizontal neighbors of weighted key is also enlarged about 1/4. If we use the example above for ’e’ key, the size of ’w’ and ’r’ is enlarged as 30px (24px + 6px) and the size of ’e’ is about 36px (24px + 12px). With this symptom, user may feel the ’e’ pops out. The same feelings also happen to the key ’i’. If we dealing with more complex cases, including vertical weighting, the Voronoi diagram helps more. Another advantage is to fill the dividing remainders for all keys.
4. drawing key polygon (optional)
In this prototype, we use SVG path to draw the polygon, without any performance tuning. This step may/should be optional. Users may be confused when the keyboard is changing frequently. Drawing it in this prototype may help us to know if the current behavior is correct.
It may be nice to make the dynamic layout as a invisible touching area above the static keyboard layout, so that user can type without any possibly inconveniences from the variable layout but still benefits from the adjustable touching area. We need more information from UX team and others’ feedback to decide which method is better.
5. touch detecting
Once having SVG path, we use click event to detect user touch. We know we should use touch end event to dispatch the key. It may not be supported in SVG. But for a fast prototype, we choose the easy way to implement it. There is another alternative for it, map element, of course.
6. learning
We haven’t thought thoroughly about it and not included in this prototype. But it is possible to have a dynamic changing on prediction table. For example, we could have a component to dynamically train our dictionaries to make the layout more suitable for every single user, and mixing it with our online updating dictionaries as well.
7. presenting the candidate keys
In this prototype, we color candidate keys with red, and users feel helpful to have the clues for the next key they should press. Of course, the visual effect we used here is coarse and could be refined, like to use a light border instead of filling the key with single color, but this additional trick may help our keyboard even greater. It can be a potential way to improve the user experience beside enlarge the keys.
The repository may be found at [1]. We also made a video for it, which may be found at [3].
Finally, thanks Rudy and Evan for more information about this fast prototype.
Thanks
John Hu
[1]
https://github.com/snowmantw/gaia/tree/vk/test_apps/voronoi-keyboard
[2]
http://scholar.google.com/scholar?cluster=11097390483940419161&as_sdt=0,5
[3]
http://www.youtube.com/watch?v=cRP4NQTN1qo
[4]
http://d3js.org