3 ms·
You could detect caps lock by looking for these conditions: * consecutive uppercase alpha characters are entered * the shift property on the keyboard event is
by austin-cheney 3y ago
You could detect caps lock by looking for these conditions:
* consecutive uppercase alpha characters are entered
* the shift property on the keyboard event is false
- selcuka 3y ago> consecutive uppercase alpha characters are entered Why consecutive? Only one uppercase character without the shift key being used should be sufficient. That being said, it's probably not the best method as the users can also copy/paste passwords, or use a password manager.
- austin-cheney 3y agoThat is why consecutive key events is necessary, to distinguish character versus a string paste operation.
- butz 3y agoIsn't keypress and paste two different events?