Oliver had a post on the old forum that uses an arcade USB encoder to send standard keyboard keys when the “arcade” buttons are pressed. He includes instructions for configuring the sandbox to use the buttons.
The Wayback Machine has his post for “USB Button Solution”, but I cannot include the URL.
Also, there are USB keyboards with one, two, five, etc. buttons. This way, the only sandbox setup is to assign tools (drain/rain) in the configuration file. I do not know how the output values are assigned to the keys, but I suspect it requires Windows for the initial setup.
Another example is Liudr’s AR Sandbox controller. He gives instructions for building flood and drain buttons using an Arduino microcontroller.
https://liudr.wordpress.com/2017/12/29/augmented-reality-sandbox-control-using-arduino-feather/