Click here to Skip to main content
Click here to Skip to main content
Alternatives (1)

Simulate a keystroke in windows

, 22 Feb 2011
This tip shows how to simulate a key stroke in windows environment

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

1 Sep 2011
Jose David Pujo
With SendInput:void SetNumLock (bool active){ BYTE keyState[256]; GetKeyboardState((LPBYTE)&keyState); bool active0= keyState[VK_NUMLOCK] & 1; if (active0!=active) { INPUT inp[2]; ZeroMemory(inp, sizeof(inp)); inp[0].type=INPUT_KEYBOARD; ...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Mukit, Ataul
Chief Technology Officer Rational Technologies
Bangladesh Bangladesh
You don't learn patterns, you just code it.
Follow on   Twitter

| | Privacy | Mobile
Web02 | 2.8.140721.1 | Last Updated 22 Feb 2011
Article Copyright 2011 by Mukit, Ataul
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid