RE: [offtopic] - it is possible to change state of LEDs

new topic     » goto parent     » topic index » view thread      » older message » newer message

martin.stachon at worldonline.cz wrote:
> Thanks for the code.
> Just a question : it is possible to rewrite it for Windows ?
> 
> Regards,

 Martin:
 First a small change to my code to make it more correct.

------------- correction ---
-- The line of code in the set_led procedure:
  -- set correct bit in bios keyboard memory location
  poke(#417,flag)
-- Should of been this:
  -- set correct bit in bios keyboard memory location
  poke(#417,or_bits(peek(#417),flag))
-------------

   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 will need to use two windows functions.
   GetKeyboardState and SetKeyboardState which retrieves
   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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu