Skip to content

Latest commit

 

History

History
11 lines (6 loc) · 523 Bytes

README.md

File metadata and controls

11 lines (6 loc) · 523 Bytes

js-caps-lock

I searched for a long time for a way to create a fully working caps lock detector with js for password fields. A lot of the code I found worked only in some parts, for example if you press caps lock it doesn't update automatically or if you press shift it says caps lock is off when its not.

This way we always look at the state of the caps lock not at the state of the characters you type.

For a demo you can look at this fiddle: http://www.jsfiddle.net/e50nmrtz/4/