Beamgun

Beamgun is an utility for Windows to block USB devices.  When an USB keyboard device is plugged in, the application attempts to block key stroke injection by continuously stealing the focus.  All injected keystrokes are logged.

https://jlospinoso.github.io/infosec/usb%20rubber%20ducky/lan%20turtle/c%23/clr/wpf/.net/security/2016/11/30/beamgun-update-poison-tap.html

https://github.com/JLospinoso/beamgun