Link to home
Start Free TrialLog in
Avatar of yoavo
yoavo

asked on

Simulate Ctrl pressing

Hi,
how do I simulate Control button pressing from my code ?

thanks,
Yoav.
Avatar of mblat
mblat

look at
SendMessage
WM_KEYDOWN
VK_CONTROL


That should do it...

Hope it helps...
You can also use

         keybd_event( VK_CONTROL,
                      0x45,
                      KEYEVENTF_EXTENDEDKEY | 0,
                      0 );


GOOD LUCK
Avatar of yoavo

ASKER

I want to simulate a continious pressing...

1. simulate a ctrl pressing.
2. do something (while the Ctrl button is still pressed).
3. release the ctrl from being pressed.

Yoav.
ASKER CERTIFIED SOLUTION
Avatar of Roshan Davis
Roshan Davis
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial