We can very well detect CapsLock is ON/not on iPhone web browser using KeyboardEvent.getModifierState(), with sample code,
function checkCapsLock(e) {
if (e.getModifierState("CapsLock")) {
alert("Caps ON");
}
}
But it doesn't work on a browser on Android Devices. I've tried many other solutions using charCode, keyCode, shiftKey, which, etc. methods on the event with listeners like keyup, keydown, keypress, etc. But no luck.
I've gone through the answers mentioned on stackoverflow, and other links too. But still no luck.
Is there any workaround for this?
I'm asking about the issue on the Android web browser!
With Key Event Viewer, we can observe that CapsLock can be detected on Web or mobile web browser on iPhone, but not on a web browser on Android devices.