Edit VID & PID
You can make the Digispark appear as a different device, such as an Apple keyboard. This is useful if you want to skip the keyboard setup assistant on macOS.
You can change the IDs to anything you want. Websites like devicehuhnt.com have a database that you can search for registered USB devices.
But to achieve this, you have to manipulate the USB Product ID (PID) and Vendor ID (VID) deep in the Arduino Digispark files.
- In Arduino, open File > Preferences
- Click on the Path at the bottom (it's a shortcut)
- Open packages > digistump > hardware > avr > 1.7.5 (or other version number) > libraries > DigiKeyboard
- Make a copy of usbconfig.h and call it usbconfig_BACKUP.h in case you need to undo the changes
- Open usbconfig.h in a text editor
- Replace the following lines:
Download a already modified usbconfig.h here to save you time. Otherwise, continue below and don't overlook the other tabs!
- USB VID
- USB PID
- Vendor Name
- Device Name
To set 05AC as USB VID (Apple), replace
#define USB_CFG_VENDOR_ID 0xc0, 0x16
with
#define USB_CFG_VENDOR_ID 0xAC, 0x05
To use 0250 as USB PID (Apple Aluminium Keyboard with ISO layout), replace
#define USB_CFG_DEVICE_ID 0xdb, 0x28
with
#define USB_CFG_DEVICE_ID 0x50, 0x02
To set the vendor name to Apple, replace
#define USB_CFG_VENDOR_NAME 'd','i','g','i','s','t','u','m','p','.','c','o','m'
with
#define USB_CFG_VENDOR_NAME 'A','p','p','l','e'
and
#define USB_CFG_VENDOR_NAME_LEN 13
with
#define USB_CFG_VENDOR_NAME_LEN 5
To set the device name to Keyboard, replace
#define USB_CFG_DEVICE_NAME 'D','i','g','i','K','e','y'
with
#define USB_CFG_DEVICE_NAME 'K','e','y','b','o','a','r','d'
and
#define USB_CFG_DEVICE_NAME_LEN 7
with
#define USB_CFG_DEVICE_NAME_LEN 8