How can I check if capslock is on without waiting for the user to type character using JavaScript?

醉酒当歌 提交于 2019-12-12 10:46:07

问题


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:

  • How do you tell if caps lock is on using JavaScript?

回答1:


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



来源:https://stackoverflow.com/questions/10680935/how-can-i-check-if-capslock-is-on-without-waiting-for-the-user-to-type-character

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!