Number and Text Entry from a Keypad

Nov 15, 2017

I'm building a "simulator" for a two way radio that has a number/text keypad that I need students to use to enter information.  The keypad is the old text entry type (before smart phones came along), so you'd need to hit the "2" key twice to get an "A" etc.  I think I can use a text entry field for numbers (enter channel number 86 for example)  What I'm not sure of is how to program the "press the "3" button three times to the letter "E" etc.  Is there a way to use a "count" criteria?  When they hit the "Enter" key on the radio image, it needs to capture the information they entered and insert into a field on a new layer.  Any ideas are greatly appreciated.

3 Replies
Veronica Budnikas

Hi Cliff, 

So, for argument's sake, if they press 1 once, they an A, twice they get a B, and three times they get a C?

You could use count variable, something like:

Adjust variable COUNT to add 1 when user clicks BUTTON1

And then Change state of KEYPAD[or whatever] to C when variable COUNT is = 3.

Would that work? Do you have a screenshot, or story file, you can share to give us more of an idea of what you need to accomplish?

Cliff Warrick

I've attached a photo of the control head.  If the user pushes a number button once, they will enter that number.  Let's use 2 as an example.  If they need to enter the letter "A", they need to click on the "2" button twice, three times for "B" and four times for "C".   In the application I'm working on they need to be able to enter both numbers and letters depending on the specific training objective.  Hope that makes more sense. 

The count variable is what I was thinking of, but I haven't used it before so I need to experiment - a lot.  The students will need to enter a string for example 0024FDORG.  It's an type of address the radio uses to connect to another - specific radio.  Kind of like a phone number or email address for that radio.  So i may be better off just having them use the computer keyboard to enter the data then click on the enter button on the radio to accept the input.  Kind of like having them enter there name and recalling it later.

Veronica Budnikas

I like Matt's idea of the layers... I imagine there is some element of time involved with these radios? As in if you want to enter C you would need to press 2 4 times fairly quickly? Is that something you need to replicate? 

I started something, but it's not exactly what you need and I haven't got time this minute to do more, but, at the very least you can see how a number variable might be used for something like this. 

The file is called buttons, and the other file is something I did a while ago. Again, not exactly what you need, but perhaps may give you some ideas about how to tackle this (it's an alarm code you need to enter before time runs out)

 

This discussion is closed. You can start a new discussion or contact Articulate Support.