I used following code but it blocks all inputs, not only wired devices but also bluetooth HID devices.
private static extern bool BlockInput(bool block);
public static void FreezeMouse()
public static void ThawMouse()
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)