Is there a way to detect simulated keyboard/mouse input on Windows. For example, a user types something on his keyboard vs sendKeys/PostMessage/On-screen keyboard. Is there
Starting form Windows 8 there's the GetCurrentInputMessageSource function. You can use it, and check the originId enum for the following value:
IMO_INJECTED- The input message has been injected (through theSendInputfunction) by an application that doesn't have the UIAccess attribute set toTRUEin its manifest file.