Gmail shows an icon in Chrome when the user has capslock on and focuses on the password field, how are they able to do that?
There are many related question to this, but no one seem to know how to do it without user input, like:
To check or detect whether the caps lock key is turned on or off, we can use the getModifierState() method on the input tag KeyBoardEvent and pass the string CapsLock to get the current state of the CapsLock key in JavaScript.
Caps Lock ⇪ Caps Lock is a button on a computer keyboard that causes all letters of bicameral scripts to be generated in capital letters. It is a toggle key: each press reverses the previous action. Some keyboards also implement a light, to give visual feedback about whether it is on or off.
Nevermind, this is a native function of the Chrome browser when focusing on password field, clever!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With