“Unidentified Keyboard”: how does macOS identify a keyboard?

When I plug in some devices that emulate a USB HID keyboard, macOS brings up the Keyboard Setup Assistant and says I have an "Unidentified Keyboard".

How does macOS determine that it is unable to identify the keyboard? Is it based on a database of known keyboards, based on, say, the USB VID/PID of the keyboard? Or is it something in the USB descriptor for the keyboard?

If it's possible to make macOS aware of the type of keyboard, I'd like to be able to include in my USB descriptors.

I can't directly answer your question. Obviously Apple knows the layout of all the keyboards it has shipped, so it could just be using the vid/pid of the keyboard.

But if you can control the USB descriptor of your device, and it isn't actually a keyboard, why make it emulate a keyboard? If you want keyboard-like functionality, just make it a vendor-defined device. The OS won't grab it and the device won't send keystrokes when you don't want it to, but you can still access it using the HID Manager.

it could just be using the vid/pid of the keyboard

Yes, and if so, is there a list somewhere, and can it be augmented?

why make it emulate a keyboard?

The background of this is that it's HID support in CircuitPython, which runs on a variety of microcontrollers. There are many projects that want to emulate a keyboard, mouse, or other HID device, attached to a number of host OS's. It can be used to build a "real" keyboard as well. So we'd like to identify these devices as regular HID devices, not vendor-defined devices.

“Unidentified Keyboard”: how does macOS identify a keyboard?
 
 
Q