i quick man ioctl_list followed by a search for LED reveals the following ioctls
Code:
0x00004B31 KDGETLED char *
0x00004B32 KDSETLED int
0x00004B64 KDGKBLED int *
0x00004B65 KDSKBLED int
and just like a good little man page it tells us there in include/linux/kd.h
so we have a peek there and find
Code:
#define KDGETLED 0x4B31 /* return current led state */
#define KDSETLED 0x4B32 /* set led state [lights, not flags] */
#define LED_SCR 0x01 /* scroll lock led */
#define LED_NUM 0x02 /* num lock led */
#define LED_CAP 0x04 /* caps lock led */
#define KDGKBLED 0x4B64 /* get led flags (not lights) */
#define KDSKBLED 0x4B65 /* set led flags (not lights) */
so with a few minutes of writing a test program it shouldnt be that hard to figure out how to do it.
<edit> it looks like jinksys gave you a pretty good start in
this post, if you had more questions you should have posted them there, 1 thread per topic please.