Check Scroll Lock, Num Lock & Caps Lock in JavaScript on Page Load

后端 未结 2 398
故里飘歌
故里飘歌 2020-12-19 09:57

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\

2条回答
  •  死守一世寂寞
    2020-12-19 10:27

    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 =/

提交回复
热议问题