LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-16-2008, 12:02 PM   #1
Eilya
Member
 
Registered: Aug 2008
Posts: 52

Rep: Reputation: 15
Lightbulb Keyboard LEDs


Hi dear friends,

I want to play with keyboard's leds (caps lock, num lock & scroll lock LEDs) I want to know how to on or off them, as I know I can make them on or off by this command in Shell scripting: $echo -e "\033[2q" but I don't know why this doesn't work, please help me by this way or any way which is better.

Regards,
Eilya
 
Old 09-16-2008, 12:25 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,678

Rep: Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971
Quote:
Originally Posted by Eilya View Post
I want to play with keyboard's leds (caps lock, num lock & scroll lock LEDs) I want to know how to on or off them, as I know I can make them on or off by this command in Shell scripting: $echo -e "\033[2q" but I don't know why this doesn't work, please help me by this way or any way which is better.
Try the setled command, look at the man page. Also, your question makes no sense, please try to write clearly. You say:

Quote:
I want to know how to on or off them
and then say

Quote:
I know I can make them on or off by this command in Shell scripting: $echo -e "\033[2q"
Which is it? Do you know how to turn them on/off or do you not know? You also don't say anything about what you're trying to do, or what the application is. Do you want to do this from a shell-script? Prompt? GUI? Application???

This page http://www.w00w00.org/files/articles/conioctls.txt has C code for turning on/off LED's.
 
Old 09-16-2008, 01:07 PM   #3
Eilya
Member
 
Registered: Aug 2008
Posts: 52

Original Poster
Rep: Reputation: 15
Dear TBOne, I said I know that command, but I don't know why it doesn't work, the purpose is just make the LEDs on or off, by any script(Shell script, c or ...) I want to make LEDs rhythmic. Thanks for the code, I googled 3days ago and found it, I tried it but it doesn't work.

Thanks for your attention,
Eilya
 
Old 09-17-2008, 01:08 AM   #4
Eilya
Member
 
Registered: Aug 2008
Posts: 52

Original Poster
Rep: Reputation: 15
guide please

any guide?
 
Old 09-17-2008, 03:33 AM   #5
rubadub
Member
 
Registered: Jun 2004
Posts: 236

Rep: Reputation: 33
When I read Cryptonomicon I had a look into this and think I remember finding something somewhere in the kernel source.
 
Old 09-17-2008, 11:19 PM   #6
Eilya
Member
 
Registered: Aug 2008
Posts: 52

Original Poster
Rep: Reputation: 15
Help plz

How can I find any source? I want just turn off and on these LEDs, moreover as I know any key press has a signal, how I can use this signal for make them on or off? as I have heard it is simple?!?
Thanks,
Eilya
 
Old 09-18-2008, 07:57 PM   #7
Eilya
Member
 
Registered: Aug 2008
Posts: 52

Original Poster
Rep: Reputation: 15
any idea????
 
Old 09-19-2008, 05:47 AM   #8
rubadub
Member
 
Registered: Jun 2004
Posts: 236

Rep: Reputation: 33
it's all in the kernel source, but a quick google turned these up:
http://www.cs.helsinki.fi/linux/linu...2-03/1408.html
http://groups.google.com/group/linux...aa725?lnk=raot
The pidgin one use gtk+, so thats what handles the keyboard signals interface with the kernel. Linux keeps this abstract as so to avoid keyloggers, in 'Designing BSD Rootkits' book there is a keylogger if I remember correctly, but it is a kernel module...

The easiest way would be to look at that pidgin (gaim) plugins' source...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
keyboard leds flashing.. what does it mean? rohan208 Programming 7 02-03-2007 01:49 PM
No red eye with LEDs extrasolar General 6 08-06-2006 12:03 PM
Why is my USB Keyboard LEDs are not Glowing? pmrseshu Linux - Hardware 0 05-24-2005 01:15 AM
VMWARE AND LEDs san_rees Linux - Software 0 07-14-2004 01:29 AM
Turning on Keyboard LEDs on startup ganninu Linux - Newbie 5 08-04-2003 02:23 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration