0

现在我正在做一个项目。

有几个键盘连接到计算机。我keybd_event()是用来控制led的,但是当我打开led(比如numlock led)时,所有键盘的numlock led也会亮。

我想控制led分开,也就是说当我打开一个键盘的led时,其余键盘对应的led不会亮。

我在 C# 中执行此操作。有人有什么主意吗?

4

1 回答 1

0

With IBMPC keyboards (and Mac, I think), keyboard state is maintained at the operating system device driver level. The hardware in the keyboard itself just tells the system which keys are pressed or released, and the driver translates that into characters actually typed. As a result, there really isn't any ability to have different keyboards in different states, and the LEDs should display the same state for all keyboards.

You MAY be able to change that behavior if you're willing to write your own USB device drivers.

于 2013-10-01T02:37:25.283 回答