Keyboard sample using variables

In response to Jeanette's blog post from last week on variables and if it's useful at all for anyone...this is a sample I created for Joseph Flanagan who was looking for ways to incorporate special character input (he needed a phonetic keyboard)...

In this sample, I used a standard English keyboard image - can be swapped out for whatever special character keyboard input is required. I placed hotspots on the keys that the user can click on. In this example, I did so for the keys A, S, D, F and the delete key. Basically I created a numerical 'space counter' variable that lets you know which letter blank to fill in based on its numerical value (it adds +1 for each key clicked, and subtracts -1 when the delete key is hit). I put in a visible text box with the space counter at the top right corner to see how it changes on click. The alphabet value of the letter blank in question changes accordingly. 

I also made it so if you type in the correct word ('FADS' in this example), correct feedback appears i.e. a green checkmark. If the delete key is clicked after, the checkmark becomes hidden.

Be the first to reply