943,915 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 6989
  • C++ RSS
Aug 11th, 2004
0

Toggle caps, num or scroll lock

Expand Post »
[FONT=Courier New]I want to toggle caps, num or scroll lock using c++ program on a unix machine. Can some one help?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mrb260478 is offline Offline
5 posts
since Aug 2004
Aug 11th, 2004
0

Re: Toggle caps, num or scroll lock

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++.
Reputation Points: 17
Solved Threads: 1
Junior Poster
cosi is offline Offline
153 posts
since Aug 2004
Aug 12th, 2004
0

Re: Toggle caps, num or scroll lock

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mrb260478 is offline Offline
5 posts
since Aug 2004
Aug 12th, 2004
0

Re: Toggle caps, num or scroll lock

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
Reputation Points: 17
Solved Threads: 1
Junior Poster
cosi is offline Offline
153 posts
since Aug 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: loop in main function to an "if" statement
Next Thread in C++ Forum Timeline: Using MFC in a Static Library





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC