Keyboard LED control using c

I want to create a program for representing binary numbers using a LED key flash. I don’t know how to start by controlling these LEDs using C language?

+6
source share
2 answers

For Linux, this would be useful.

setleds

Learn more about internal components and several command line descriptions.

Keyboard and Console - HowTo.pdf

+2
source

For windows:

Because the SetKeyboardState function changes the input state of the calling stream, rather than the global login state, the application cannot use SetKeyboardState to set the NUM LOCK, CAPS LOCK or SCROLL LOCK (or Japanese KANA) indicator on the keyboard. They can be installed or cleaned using SendInput to simulate keystrokes.

See API for Windows API

+1
source

Source: https://habr.com/ru/post/927322/


All Articles