Detecting the presence/absence of a numeric keypad?

前端 未结 2 1379
死守一世寂寞
死守一世寂寞 2021-01-24 02:23

Is it possible to determine whether there is a numeric keypad connected to the system? Desktop keyboards typically have numpads, while laptops typically don\'t (though they put

2条回答
  •  情深已故
    2021-01-24 02:41

    I don't believe you can query for keyboard capabilities but iirc there is a "numpad" key. ;)

    You should be able to query if Num is on or off, but it being off won't be a foolproof way to know that there is no numeric keypad.

    What you could probably do is detect keys being pressed on a numpad and subliminaly trick the user into doing so, which would identify said characteristic.

提交回复
热议问题