Is it possible to check the status of Scroll Lock, Num Lock and Caps Lock on page load of a web page? I've found ways to check after a keypress using JavaScript, but that's not what I'm asking.
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
IN 2019, this is now possible:
Source: https://www.w3schools.com/jsref/event_mouse_getmodifierstate.asp
No, you can't get system state from javascript. You will need them to type something and then analyze the input. Probably not what you wanted to hear =/