Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Controlling keyboard LED lights using c

Tags:

c

I want to create a program to represent binary numbers using keyboards LED flash. I don't know how to begin with controlling those LED lights using C language?

like image 771
Afaq Avatar asked Oct 10 '12 08:10

Afaq


2 Answers

For Linux, this would be helpful

setleds

A more comprehensive internals and several command line utilities description

Keyboard and console - HowTo.pdf

like image 151
fkl Avatar answered Sep 17 '22 13:09

fkl


For windows:

Because the SetKeyboardState function alters the input state of the calling thread and not the global input state of the system, an application cannot use SetKeyboardState to set the NUM LOCK, CAPS LOCK, or SCROLL LOCK (or the Japanese KANA) indicator lights on the keyboard. These can be set or cleared using SendInput to simulate keystrokes.

See Windows API ref

like image 22
admiring_shannon Avatar answered Sep 20 '22 13:09

admiring_shannon