title: How can I turn on/off Caps Lock, Scroll Lock, Num Lock key programatically
body: <p>Here some come code in linux for example:</p>
  
  <pre><code>void set_leds(int val) 
  {
   int fd = open ("/dev/console", O_WRONLY);
   // argument (Bit 0 - Scroll Lock, Bit 1 - Num Lock, Bit 2 - Caps lock)
   ioctl (fd, KDSETLED, val);
   close(fd);
  }
  void set_leds_sequence(unsigned char * cmdSeq, int len)
  {
   int i;
   for (i = 0; i &lt; len; ++i)
   {
     set_leds( cmdSeq[i] );
   }
  }
  void activate(void)
  {
   unsigned char seq_activate[3]  = {3, 5, 4};
   set_leds_sequence(seq_activate, 3);
  }
  </code></pre>
  
  <p>How can i do something like that on Windows (C++\C)? I have a feeling that the keybd_event does not approach me.
  Is there a simple method to turn on/off Caps Lock, Scroll Lock and Num Lock LEDS on Windows?</p>