I want to capture what key has been pressed on the keyboard and then perform a different action based on that key. For example, if they pressed "c" they get a point and continue. If the press "x" they don't get a point and continue. The user could press any of the keys on the keyboard.
I do however it has confidential information on it. I was trying to capture the keystroke pressed and store it in a variable, then perform an action based on that value.
I can capture a key pressed with the When User Presses Key event. However, I want to capture every other key press option without creating 25 other triggers. Does that make sense?
So you don't have one or two that will return a 'correct' answer and the others are 'incorrect' you have different actions for all 26 - is that what you mean?
Hi Rick -- I see that Wendy and Phil are helping you here, but I wanted to stop in to note as you've mentioned potentially using JavaScript, that is not something for which we'd be able to provide support. Fortunately, if you'd want to go that route, we have lots of community members who are more than willing to share their expertise to assist!
Rick this is possible, convert to freeform and add a shortcut key freeform, this will show correct layer for your letter and incorrect layer for any other key.
10 Replies
Hi Rick
do you have something partially setup already that you could upload?
I do however it has confidential information on it. I was trying to capture the keystroke pressed and store it in a variable, then perform an action based on that value.
I can capture a key pressed with the When User Presses Key event. However, I want to capture every other key press option without creating 25 other triggers. Does that make sense?
So you don't have one or two that will return a 'correct' answer and the others are 'incorrect' you have different actions for all 26 - is that what you mean?
you would need a trigger for each key unfortunately, or look for a javascript solution.
they need to press the "c" key to continue and will get a point. Any other key will not get a point and allow them to continue.
do you have a javascript solution for me?
Sorry no, the last time I did this I just created a trigger for each key.
Hi Rick -- I see that Wendy and Phil are helping you here, but I wanted to stop in to note as you've mentioned potentially using JavaScript, that is not something for which we'd be able to provide support. Fortunately, if you'd want to go that route, we have lots of community members who are more than willing to share their expertise to assist!
And in case you want to check it out, here is our JavaScript Best Practices sheet, as well. :)
Rick this is possible, convert to freeform and add a shortcut key freeform, this will show correct layer for your letter and incorrect layer for any other key.
This discussion is closed. You can start a new discussion or contact Articulate Support.