Hello! I create some simple application for fast translate “selected” text, so I used some small utility to copy the selected text to the clipboard, from which is already being translated. The problem is that a utility that emulates pressing a combination of Ctrl + C antivirus regards as malicious. Source code for emulation keyboard combinations took from the official Microsoft site, with your permission, I give it below:
Sleep(500);
// Simulate a key press
keybd_event( VK_CONTROL,
0x45,
KEYEVENTF_EXTENDEDKEY | 0,
0 );
keybd_event( (BYTE)'C',
0x45,
KEYEVENTF_EXTENDEDKEY | 0,
0 );
// Simulate a key release
keybd_event( (BYTE)'C',
0x45,
KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,
0);
keybd_event( VK_CONTROL,
0x45,
KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,
0);
Full code: https://github.com/NeiroNext/QuickTranslator/blob/master/src/win_xsel/main.cpp
Please help with the problem!
How to make this tool so that it was not considered pernicious, because the code can be seen it she was not doing anything wrong?