&gt; Compiled and ran the code and immediately Bitdefender blocked the program and put up a &quot;Keylogger detected&quot; message.<p>Which is quite problematic because it was a false positive. You knew and wanted that program to log key presses.<p>That&#x27;s the trouble with aggressive heuristics. Users are going to have a program that translates keyboard layouts by hooking the key presses. Or software that comes with some fancy input device.<p>Then the antivirus says it&#x27;s a keylogger even though they know it isn&#x27;t and the user is taught to expect good rather than bad things when they press &quot;allow&quot; against a something-is-wrong prompt.