A while ago I wrote a Rubber Ducky server [1] that is remote controlled and uses a Raspberry Pi Zero W (which supports being a USB HID device).
Once connected to a host computer, it exposes a hidden WiFi network that allows you to inject and run Ducky Scripts remotely in real time using a small web interface.
It also includes a Ducky Script parser written in Python which could be useful outside of this project.
You can grab it here [2]
I wrote something similar to this, except it used the caps lock key to get data back across from the computer. The benefit is that you don't need to rely on a network to get data back. Often the keyboard is the most trusted device on the machine.
Glad this is a thing - having lost 2 rubber duckies myself, a cheaper alternative is great. Only thing I would need is DuckyScript compatibility, so I wouldn't need to rewrite all my existing payloads.
By the way, the repo author has done a lot of work to develop a whole USB attack platform based on Raspberry Pi 0, which really deserve some interests:
https://github.com/hak5darren/USB-Rubber-Ducky/wiki/Payloads