Hi,
I don't know why you use direct input functions but anyway i have found this API function, it works
keybd_event (VK_H, 0, 0, 0); press H
keybd_event (VK_H, 0, KEYEVENTF_KEYUP, 0) release H
i used it send ctrl+m command to lock on like this (btw LOMAC must be the window at the top)
keybd_event (VK_CONTROL, 0, 0, 0); press control
keybd_event (77, 0, 0, 0); press M key in ASCII
keybd_event (77, 0, KEYEVENTF_KEYUP, 0); release M
keybd_event (VK_CONTROL, 0, KEYEVENTF_KEYUP, 0); release Control
if you stil solve some programming problems for your application let me know. I'm programming small utility in C++ for LOMAC server which write some info about mission into a chat window. It can be seen for example on AVIASIBIR HL server.
cheers :thumbup: