Detect input keystroke

I found a JavaScript solution on StackOverflow but not sure how to implement this in Bubble. I want to fire Workflows when a keystroke is detected. Anyone?

$("#input-id").on("change keyup paste", function(){
1 Like

Did you ever get a solution here? I’d like to advance the cursor to the next input at the keystroke event, not ‘the value changed’ which fires on tab.

The application is for single character input fields.

I’m not sure what you mean. I have created the plugin below a while back. Not sure if that will serve as a workaround?

I have five input fields. Each one is set up to receive a single character input using format as text (number) with a character limit of 1.

When they enter the single character in the first input I want to set focus to the next input, and then the next, until they have completed all five. I don’t want them to need to click into the next input or hit tab.

Why would I do this instead of have them enter all values in one input? Because I am collecting pass codes, and this is the recommended practice.

My first thought was to use the ‘when value changed’ trigger, but that doesn’t pick up keystrokes.

My guess it this can be done with Javascript. There are plugins that pick up keystrokes, but they are meant to be used to dynamically update other inputs on screen.

I see, I’d recommend you to create a topic and see if anyone can help. I don’t have experience with that and perhaps someone has the solution for you.