Many projects have existed out there (check out @samyk !) that turn Arduino HID keyboard devices into USB rubber ducky-likes. However, these devices are already themselves HID devices, and just ...
All switches are connected at one end to a pull-up input, and connect to ground on close. The analog input for the food pedal expects a potentiometer (e.g. 10k). Note that the MIDI output is used.