unique device or usb name when using trinket as keyboard

Adafruit's tiny microcontroller platform. Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
cdavidi
 
Posts: 1
Joined: Sat Jun 06, 2015 4:24 pm

unique device or usb name when using trinket as keyboard

Post by cdavidi »

I made a device with trinket pro as keyboard I need it to show up as XYZ keyboard when plugged in the USB port of PC or MAC
I read all the usbconfig.h and other files but there is no where to add a descriptor like this I don't want it to show as generic HID under windows and MAC
Basically when I plug it in, I like to see ADAFRUIT keyboard plugged in (rather than vanilla HID keyboard) Arduino Due somehow managed to just do this when I plug it in I see which Due usb port or (programming port for example) - that is cool ! how did they do that?

User avatar
MiMc
 
Posts: 1
Joined: Fri Aug 07, 2015 4:49 pm

Re: unique device or usb name when using trinket as keyboard

Post by MiMc »

Hi! I know this is an old thread now, but I'm considering making a Trinket-keyboard-based project myself, and read through a few of the files in the TrinketKeyboard library a couple days ago because that same question had occurred to me, too. If you look on lines 258 and 259 of usbconfig.h, you'll see that the vendor name ("Adafruit" by default) is defined literally one character at a time, and then you have to tell it how many characters are there for good measure. The same goes for the device name ("Trinket Keyboard") on lines 268-269.

Hopefully that still helps, even if it's two months late! (Also, sorry if I misunderstood what you were looking for.)

Locked
Please be positive and constructive with your questions and comments.

Return to “Trinket ATTiny, Trinket M0”