Click to See Complete Forum and Search --> : Simulate a press of the cntrl key


tofurocks
December 18th, 2008, 06:59 PM
What would be the easiest way to simulate pressing the control key in C++?
(make it press the button for you instead of having to manually press it on the keyboard)

egawtry
December 19th, 2008, 10:01 AM
C++ or WinAPI?

C++, it would depend on the platform.

WinAPI, just send the WM_KEYDOWN message and fake out the app.

-Erik

golanshahar
December 19th, 2008, 11:08 AM
What would be the easiest way to simulate pressing the control key in C++?
(make it press the button for you instead of having to manually press it on the keyboard)

Look at this FAQ (http://www.codeguru.com/forum/showthread.php?t=377393).

Cheers

tofurocks
December 19th, 2008, 06:19 PM
OMG thanks so much guys im making my friend an app and this will complete it :D