Re: it is possible to change state of LEDs
> martin.stachon at worldonline.cz wrote:
> > Thanks for the code.
> > Just a question : it is possible to rewrite it for Windows ?
> >
>
> Yes it would be possible to do this in windows.
>
> I'am not going to write the code for you because that will
> not help you to learn, but I will give some direction.
You've read Didactica (by Jan Amos Komensky) ?
> You will need to use two windows functions.
> GetKeyboardStat or copies a 256 byte array of virtual keycodes.
> You will be able to change the state of any key on the keyboard.
> The VK_xxx codes can be used to map into the array to find the
> correct key. For example if you change the num-lock key the
> num-lock LED would change state and etc.
>
> I hope this helps its the only way I can think of to do this
> in windows.
>
> Bernie
Sorry Bernie, but I found in MS docs this :
"Because the SetKeyboardState function alters the input state of the calling
thread and not the global input state of the system, an application cannot
use SetKeyboardState to set the NUM LOCK, CAPS LOCK, or SCROLL LOCK
indicator lights on the keyboard."
Maybe other way is some direct call to keyboard driver or
writing own keyb driver I don't know.
Martin
|
Not Categorized, Please Help
|
|