Click here to Skip to main content
12,076,925 members (48,067 online)
Click here to Skip to main content
Alternatives (1)
Add your own
alternative version

Tagged as


7 bookmarked

Simulate a keystroke in windows

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


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; ...


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
If you are not in - you are out !
- Chapter 1

| | Privacy | Terms of Use | Mobile
Web04 | 2.8.160212.1 | Last Updated 22 Feb 2011
Article Copyright 2011 by Mukit, Ataul
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid