Well, under Windows, DirectInput can be told to only grab the keyboard when the application has focus, for example. Or it can be told to grab it when it hasn’t got focus - that’s what a keylogger does. Dunno about any other OSes.
But I’d say the detection software’s flawed if it flags signed software, or if it throws a wobbler when an application with focus is reading the keyboard.
Cas 