Hi I am working one application ,in this application I need to show the typing indicator , I am able to show that indicator ,when the user is typing I am sending a message to receiver that the user is typing, I am sending this message continuously when the user press with onkeypress event any key, Now my question is I want to send this message when the user starts typing and next message I want to send after 20 Seconds
I'm not sure if this is what you asked for but here it is:
setTimeout(() => yourFunction(args), 20000);
the function will be called after 20 seconds, you can define the function to check for key presses and then send the is typing.