For such purposes you need to use Hooks. Start from here: http://msdn.microsoft.com/en-us/library/ms644959(v=vs.85).aspx
If you need to intercept some System-wide event it has to be a global Hook
. You can only use it if you create a separate DLL installing the Hook in the global Hook Chain
I'm pretty much sure a Hook can block any key input and break a hook chain. At the moment I have no idea how can you get any data identifying a particular HID so you could tell one from another; I'm not sure this information is available.
The only thing I can think of is developing custom drivers for your HIDs using DDK.