ok, I can simulate hardware key:
press down:
keybd_event(VK_F1, MapVirtualKey(VK_F1, 0), KEYEVENTF_SILENT, 0);
press (push) up:
keybd_event(VK_F1, MapVirtualKey(VK_F1, 0),
KEYEVENTF_SILENT|KEYEVENTF_KEYUP, 0);
BUT how to simulate that I press and hold the key down? Just longer.
I tried to separate the two of the above lines with timer and execute the
second after the specified timer - DONT WORK of course
I tried to execute the first of above lines multipled - DONT WORK
any suggestions?