Has anyone had success using the keyboard functionality of any arduino in single user mode of mac computers? I would like to inject keystrokes in single user mode, and have been unsuccessful with the atmega32u4.
OS X requires a "Boot Interface" compatible HID profile for a keyboard to work in single user mode (it has only loaded very rudimentary drivers by that point). The Arduino doesn't provide that interface, so can only work with the more advanced drivers the OS provides once booted.
You can try setting the "boot interface" flag to 1 in the interface subclass (here, I think, changing
HID_SUBCLASS_BOOT_INTERFACE) though I have no clue what the actual effect of that will be given that it's a composite device that may or may not conform to the boot interface standard.
I have found the solution to my problem. The issue is that the presence of both the usb device and serial port causes issue in single user mode. For the keyboard to work properly, the serial port must be disabled. This means that reflashing the micro requires pulling the reset pin low twice quickly for the port to show up again. Here is an example of how to remove the serial port: https://github.com/gdsports/usb-metamorph/tree/master/USBSerPassThruLine