[SDL] Keyboard Light Emitting Diodes

Sami Näätänen sami.naatanen at kolumbus.fi
Wed Dec 11 08:42:01 PST 2002


On Wednesday 11 December 2002 05:16, Juan D. Espinoza wrote:
> What I am trying to do is set up the keyboard lights to reflect the
> players state ( IE: three LEDs great, two so so, one bad, and
> flashing would mean gameover ) I've been going through some of the
> code to manipulate the LEDs though I'm having trouble deciding how to
> go about it there are two ways ( as far as i can tell ) one through
> the kernel code tty, keyboard code and the such ( have look through
> the linux/kd.h ) that involves changing the lights not the state and
> the second seems to be through the X server I'm not certain which
> would be easier but you are correct when you say that you need
> control of the keyboard ( IE: through root, or uid access ) I know
> this not the most secure way to go about it but I'm pretty new to
> programming so this is the most likely way I'll implement it.

Remember to make those states visible trough other means, because some 
of us doesn't have those leds. (wireless keyboard)





More information about the SDL mailing list