views:

137

answers:

3

Hello There Its Me vijay...

Is There Any Method To Blink The LEDs Of Scroll Lock etc???...

Post me the Code Snippet in any Lang....But My Preference Is c/c++,Java...

PS:I M Making a Morse Code Program Which Blinks The Scroll Lock LED....

+1  A: 

On windows: http://msdn.microsoft.com/en-us/library/ms646289%28VS.85%29.aspx

Pavel Radzivilovsky
Can i do this in java???
Vizay Soni
+4  A: 

I am assuming that you are using Windows[1]. This answer will not work on other platforms.Your best bet would be to use the SendInput() API function to simulate WM_KEYDOWN and WM_KEYUP messages on the Scroll Lock Key.

See http://msdn.microsoft.com/en-us/library/ms646310%28v=VS.85%29.aspx.

[1] I base my guess on the following: *nix users (including Mac users) normally state their platform. Those who are unaware of other platforms are usually Windows users. :-)

Michael J
+1 even just for the footnote :)
Matteo Italia
A: 

Yeah...I Got It...

I Found It MySelf...

The Code Is In Java

Create a object of Toolkit Class..

Toolkit Viz = Toolkit.getDefaultToolkit();

now There Is A Method is Toolkit Class ...

To On CAPS LOCK....

Viz.setLockingKeyState(KeyEvent.VK_CAPS_LOCK,true);

To Off CAPS LOCK....

Viz.setLockingKeyState(KeyEvent.VK_CAPS_LOCK,false);
Vizay Soni
Great; Now, If You Also Stopped Capitalizing Every Word It Would Be Nice, And Also You'd Preserve Your Shift Key From Premature Death.
Matteo Italia
Buddy Its In My Habbit...i will try to get rid of it...BTW Whats the problem??
Vizay Soni