I have a Logitech Internet Navigator Keyboard that came with a USB to PS/2 adapter. This keyboard has the usual 104 ANSI keys, plus it has several multimedia keys.
On every FreeBSD 13.1 computer that I've tested, this keyboard's 104 ANSI keys work perfectly regardless of whether it's connected via USB or PS/2. kbdscan correctly detects all 104 ANSI keys, but it's unable to detect any of the multimedia keys.
Running X.Org's twm, xev is also able to detect all 104 ANSI keys, but it's unable to detect any of the multimedia keys when this keyboard is connected via USB. If I connect this keyboard to the same computer using PS/2, then xev is able to detect all the multimedia keys.
When this keyboard is connected using USB, usbdump produces output every time any of the multimedia keys are pressed. This indicates that FreeBSD is detecting these keystrokes via USB, but it's relaying them differently than via PS/2.
I've tried running the same version of X.Org on a different operating system, and xev was able to detect the multimedia keys via both PS/2 and USB. This suggests a problem with FreeBSD's drivers.
I've tried using window managers that offer overrides to the keyboard model detected by X.Org, but the results were the same. I've tried manually specifying the keyboard model to use in xorg.conf, but this made no difference either.
I've tried the iichid method that other users have suggested here, and I've tried the USB quirk method with this keyboard's vendor and product identifiers, but neither of these methods gave me the successes that others have enjoyed. xev still won't detect this keyboard's multimedia keys when it's connected via USB.
Regardless of whether or not the iichid or USB quirk methods are used, there's a message that appears 32 times while booting when this keyboard is connected via USB, but I haven't analyzed the source code to see if this is related:
hid_get_item: HID_ITEM_MAXUSAGE should be increased up to 16 to parse the HID report descriptor
Usable computers with PS/2 ports are becoming increasingly scarce, and I personally know several FreeBSD users who have encountered this problem as they've upgraded and/or replaced their computers. We could replace our keyboards with newer models, but given that these keyboards otherwise continue to work to our satisfaction, I'd consider this wasteful.
I'm willing to put more time into solving this problem and submitting a patch, but I'm hoping that somebody here might have some better ideas. Any helpful suggestions would be appreciated.