I've been messing around with installing keyboard firmware onto my Arduino UNO R3 (I used this tutorial) and had an interesting idea: would it be possible to have this install custom firmware, automatically? If so, how would it be done via a DFU programmer?
Yes, if your Uno (or other Arduino) uses an Atmega8U2 or 16U2 for its USB interface, you can use
dfutool within a script to automate downloading of new firmware into the USB interface chip(s). In general, that new firmware should support USB communication with a host, plus whatever new capabilities you want to provide.