I'm currently building a project using the Arduino Leonardo with the USB Host Shield 2.0 from Circuits@Home to implement a hardware-based keyboard remapper. Basically, the device will read from a USB keyboard that is plugged into the USB host shield, interpret the scancode, and send out a different scancode based on the desired keyboard mapping. The project is available in here for anyone who's interested.
I have managed to get the sketch to work as desired, the only problem is that when I take the hardware and plug into another Windows computer, there will always be this prompt that a new hardware as been detected (Arduino Leonardo) and prompts me to install device drivers. Although I can ignore this prompt and the HID portion will work just fine, I'm looking for a solution such that I can completely "hide" away the Arduino portion such that when I plug in the device to a new computer, the computer only see it as a pure HID device (just like what it should see if I plug in a keyboard). However, if I plug in the Arduino back onto my computer, I should retain the ability to program and upload sketches.
Any guidance in this area would be greatly appreciated, thanks!
Thanks Lakes and cyclegadget. However, the video mentions the UNO which contains the 8U2 which can be reflashed using DFU to change from Serial to HID. However, the Leonardo combines the functionality of the 8U2 and the 328 into a single 32U4 chip that is able to function as both the "brains" and the USB serial interface. Hence I'm not sure how I can disable the serial interface to enumerate as a pure HID device.
I was lead to believe that the 8U2, 16U2, and 32U4 chips are in the same family. Therefore, my thought is that you can make the 32U4 identify itself like the 8U2.
Part of video described how USB devices identify themselves to the computer, which is part of your issue. The problem you have is figuring out how to change the identifier while keeping your program usable. I think it can be done but, you need to study and research the process.