且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在不等待用户使用JavaScript键入字符的情况下检查capslock是否已打开?

更新时间:2022-10-19 07:52:02

没关系,这是Chrome浏览器的本机功能,专注于密码字段,聪明! / p>

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:

Nevermind, this is a native function of the Chrome browser when focusing on password field, clever!