well....the situation is like this:
i was playin around with ioctl() f-ion. And found file something like /usr/inlcude/linux/kd.h. i found there lot's of interesting stuff, and constants with keyboard leds. I wrote a program which turns on Numlock led and exits.
the code is:
the Num Lock led turns on, but when i press numlock key a couple of times, it won't work. The led is still on. I tried various ioctl() usage (with different params), but it didn't work anyway. Anyone know how i can turn it off ?!Code:#include <stdio.h> #include <linux/kd.h> int main(int argc, char *argv[]) { ioctl(1, KDSETLED, NUM_LED); return 0; }
OS: Linux Debian 2.2 R4 (kinda old, but very good for C studies)
Compiler: gcc 2.smth
Thank you



LinkBack URL
About LinkBacks



cool eh ?!