How can I program triggering a key press/event?
For the following use case: Normally one can zoom with the "+" and "-" keys, but I would like to zoom with "q" and "r" and my idea is when "q" is pressed to trigger pressing the "+" key. Or are there better ideas how to create this use case?
I found it:
void keybd_event(int bVk,int bScan,int dwFlags,int dwExtraInfo);
keybd_event(187,0,0,0); //+ button
keybd_event(189,0,0,0); //- button
To add comments, please log in or register