Forum Discussion
Triggered event when any key is pressed?
Hello,
Is there a wild card available so that when any key is pressed I can trigger an event? Assuming I have an input text field, I'd like to have a triggered event, such as changing the color of the background, when the user presses any key.
I'm currently using the top 20 most popular letters but now I'm realizing I have to create a new triggered event for them as capital letters too... and then I have the 10 digits to work with.
It would be super nice if there was a wildcard option though I can't find any solid reference of this online. Even if there was the ability to use an 'onfocus' feature, but I don't think that's possible yet.
Thank you for any insight!
- Mary-ScottHu258Community Member
This would be incredibly helpful!
- PhilMayorSuper Hero
you could use javascript to blur and then set a trigger if the variable has changed.
See the attached file, which counts when it blurs.
- BenNichols-7d2fCommunity Member
Phil,
Can you explain why this works when I download your blur_count.story file, but when I recreate it exactly in my file, the Text Entry doesn't lose focus until I click outside the text box? On yours, it appears to immediately lose focus as I type. On my files, I need to click outside of the text box to trigger the "lose focus". I'm perplexed.
Edit: I'm using Storyline x64... not sure if there is an compatibility issue there.
- BenNichols-7d2fCommunity Member
I just figured out the issue. I have a custom Slide Size of 1920 x 1089. When I adjust the Slide Size to one of the presets (either 4:3 or 16:9) the JavaScript executes properly. So now my question to Articulate is... why?