Toggle caps, num or scroll lock

Reply

Join Date: Aug 2004
Posts: 5
Reputation: mrb260478 is an unknown quantity at this point 
Solved Threads: 0
mrb260478 mrb260478 is offline Offline
Newbie Poster

Toggle caps, num or scroll lock

 
0
  #1
Aug 11th, 2004
[FONT=Courier New]I want to toggle caps, num or scroll lock using c++ program on a unix machine. Can some one help?
Reply With Quote Quick reply to this message  
Join Date: Aug 2004
Posts: 153
Reputation: cosi is an unknown quantity at this point 
Solved Threads: 1
cosi's Avatar
cosi cosi is offline Offline
Junior Poster

Re: Toggle caps, num or scroll lock

 
0
  #2
Aug 11th, 2004
Try using setleds. It comes standard on most linux boxes.
http://linux.about.com/library/cmd/blcmdl1_setleds.htm

For fun check out:
http://www.hut.fi/~jlohikos/tleds_orig.html
Blinking leds for network activity!

Back to your question... simply do a exec (...) to call the setleds program, or look at the sources for tleds or setled. It shouldn't be hard at all to do programatically in C++.
Reply With Quote Quick reply to this message  
Join Date: Aug 2004
Posts: 5
Reputation: mrb260478 is an unknown quantity at this point 
Solved Threads: 0
mrb260478 mrb260478 is offline Offline
Newbie Poster

Re: Toggle caps, num or scroll lock

 
0
  #3
Aug 12th, 2004
Hi Cosi,

Thanks for replying.
I tried the sites mentioned by you. But they don't show the sources. I have come across a source that could toggle caps lock on and off but on a Windows/Dos operating system using POKEB or PEEKB functions including in header file DOS.H, which is not helpful, as I have to run the program on a Unix (SCO Unixware) Operating system on which dos.h cannot be run. Can you or any one suggest what functions are available on Unix Operating system like POKEB or PEEKB on Windows/Dos operating system. :p
Reply With Quote Quick reply to this message  
Join Date: Aug 2004
Posts: 153
Reputation: cosi is an unknown quantity at this point 
Solved Threads: 1
cosi's Avatar
cosi cosi is offline Offline
Junior Poster

Re: Toggle caps, num or scroll lock

 
0
  #4
Aug 12th, 2004
Uhh.. I clearly see that tleds has source code on their website. Check again. At any rate, you may do an exec C function to call the program setleds. This will also work.

Ed
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC