Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You should be able to do this just fine with MouseEvents, and use `mouseup` or `mousedown` on the input box to trigger your "Caps On" icon, visible before the user starts typing.

docs: https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/...



It wouldn't even need to be an event on the input, it could be any key or mouse event on the document, including mousemove.

That being said, I think it would be better if browsers would implement this; that would make it more efficient and more predictable.


> mousemove

True, but I was trying to avoid handlers being fired constantly. Just something to consider.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: