Skip to content
Advertisement

Tag: keyboard

How can I hide the Android keyboard using JavaScript?

I would like to hide the Android virtual keyboard in JavaScript. Someone suggested doing this: But this doesn’t work if the keyboard is already visible. Is this something that can be done? Answer What you need to do is create a new input field, append it to the body, focus it and the hide it using display:none. You will need

Check if a key is down?

Is there a way to detect if a key is currently down in JavaScript? I know about the “keydown” event, but that’s not what I need. Some time AFTER the key is pressed, I want to be able to detect if it is still pressed down. P. S. The biggest issue seems to be that after some period of time

Advertisement