Keyboard Light Emitting Diodes

Is there away to manipulate the Keyboard LED’s directly from SDL or perhaps an
add-on library for this. For instance say i would like to turn on/off all
the LEDs and make them only accessible trough my program( so that no one else
can touch them be it through a different program or the keyboard itself )
would this be possible through SDL( if so how ) or would it be wiser use
something other than SDL.

Thanks In Advance,

Juan D. Espinoza

Is there away to manipulate the Keyboard LED’s directly from SDL or perhaps an
add-on library for this. For instance say i would like to turn on/off all
the LEDs and make them only accessible trough my program( so that no one else
can touch them be it through a different program or the keyboard itself )
would this be possible through SDL( if so how ) or would it be wiser use
something other than SDL.

You’ll have to write your own LED code. I’m pretty sure you can’t lock out
other programs from changing the keyboard LED’s.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

I know I’ve seen other libraries that can set/unset LEDs, Allegro I
believe had some code to do that so I’d check there first. As for
locking the LED’s I’d agree with Sam that it probably isn’t (and
shouldn’t be) possible.

  -James Turk

Sam Lantinga wrote:>>Is there away to manipulate the Keyboard LED’s directly from SDL or perhaps an

add-on library for this. For instance say i would like to turn on/off all
the LEDs and make them only accessible trough my program( so that no one else
can touch them be it through a different program or the keyboard itself )
would this be possible through SDL( if so how ) or would it be wiser use
something other than SDL.

You’ll have to write your own LED code. I’m pretty sure you can’t lock out
other programs from changing the keyboard LED’s.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Yes you are right allegro does LED manipulation but it does not do it just the
way I am aiming I’ve been looking into this and there are ways to do this (
IE: tleds http://www.hut.fi/~jlohikos/tleds.html, also ledcontrol
http://sampo.rdx.net/ledcontrol/ ) so it is not impossible hard perhaps but
not impossible.

Thanks,–
Juan D. Espinoza

Yes you are right allegro does LED manipulation but it does not do it just the
way I am aiming I’ve been looking into this and there are ways to do this (
IE: tleds http://www.hut.fi/~jlohikos/tleds.html, also ledcontrol
http://sampo.rdx.net/ledcontrol/ ) so it is not impossible hard perhaps but
not impossible.

Just curious, why do you want to do that?

BTW, it isn’t hard to do if you have write access to the keyboard. Just
a matter of sending a couple of bytes with the correct bits set. Trouble
is that it is kind of hard to share the keyboard. Look inside the X
server for complete code for controlling the keyboard.

	Bob PendletonOn Tue, 2002-12-10 at 13:20, Juan D. Espinoza wrote:

Thanks,


Juan D. Espinoza


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

±-----------------------------------+

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.

Best Regards,–
Juan D. Espinoza

Remember to make those states visible trough other means, because some
of us doesn’t have those leds. (wireless keyboard)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.

Is there documentation for the SDL_ttf library I’ve looked around the sdl web
page as well as google and have not found any documentation for the SDL_ttf
library does anyone know if there is such documentation

Thanks in Advance,–
Juan Espinoza

I’m not sure of any docs, proper, but the SDL_ttf.h header and
"showfont" example program are fairly helpful. It’s a fairly simple
library, API-wise.

Good luck!

-bill!
(man, I hate saying “the source is the documentation” - sorry ;^) )On Fri, Dec 13, 2002 at 03:12:50PM -0800, Juan D. Espinoza wrote:

Is there documentation for the SDL_ttf library I’ve looked around the sdl web
page as well as google and have not found any documentation for the SDL_ttf
library does anyone know if there is such documentation

Thanks the showfton cleared things up a bit though I’m pretty sure that I
might have missed a feature or two when I skimmed through the source code
thanks for the advice.

(man, I hate saying “the source is the documentation” - sorry ;^) )

heh :smiley:

Thanks,–
Juan Espinoza