I have a textarea and I would like to know if I am on the last line in the textarea or the first line in the textarea with my cursor with JavaScript. I thought of grabbing the position of the first newline character and the last newline character and then grabbing the position of the cursor. Is it possible to
Tag: input
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