ENIGMA Forums

Sharing is caring => Tips, Tutorials, Examples => Topic started by: death-droid on August 10, 2008, 12:56:00 am

Title: C++ code for numlock
Post by: death-droid on August 10, 2008, 12:56:00 am
cpp{
int  ReqdNumLockState = 0x0008;


if( (GetKeyState( VK_NUMLOCK ) & 0x0008) != ReqdNumLockState )
{
  //Ponemos el NumLock a ON, para que se pueda escribir con el numpad directamente.
  keybd_event( VK_NUMLOCK, 0x45, KEYEVENTF_EXTENDEDKEY | 0, 0 );
  keybd_event( VK_NUMLOCK, 0x45, KEYEVENTF_EXTENDEDKEY |   KEYEVENTF_KEYUP, 0 );
 }
}


There you go all just in case you needed it XD
Title: Re: C++ code for numlock
Post by: RetroX on August 10, 2008, 02:09:08 pm
What exactly does it do...?  Me no speak spanish.  Translate comments, please.  I'm pretty sure it turns on/off the numlock, but I can't be sure.  Please do not thrust code into our hands and expect us to know what it does.
Title: Re: C++ code for numlock
Post by: indecom on August 10, 2008, 02:56:46 pm
It toggles numlock on and off.
Title: Re: C++ code for numlock
Post by: death-droid on August 11, 2008, 01:05:28 am
Lol woops for got to put the translated version up and yes it does toggle the numlock but it was also one of the requested things