3 ms·
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 u
by richwater 3y ago
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/getModifierState https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/...
- twiss 3y agoIt 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.
- richwater 3y ago> mousemove True, but I was trying to avoid handlers being fired constantly. Just something to consider.