I've been coding a Teensy based PS/2 to USB converter, and experimenting with different ways of structuring the reports that it sends. A lot of what I've done has been tried already, and I'm still finding relevant info on here that I haven't read before, but maybe some of this is new info. :-)
(I'm thinking about adding a wiki page to collect wisdom on this subject, probably with a similar title to this thread. To begin with, it may be little more than a glorified list of bookmarks, but that will be useful in itself because searching doesn't work very well for finding all the useful tidbits that have been posted in the past).
I tried simply making the reports longer by adding more bytes for key data, but this suffers from a
bug in Windows. The bug also affects standard 6-key reports, as well as any with the same style but longer.
Anyway, once you get up to using a 23 byte report, there's enough space to store a complete array of bits, one bit per valid USB key code. So I tried that, and it works well. If the above bug affects it, it's not until you press a truly ridiculous number of keys.
But then there's boot compatibilty to consider... on my PC, with a nice modern BIOS, it's no problem. Its BIOS sends a SetProtocol command at the right time, and the adapter can use that to know which style of report to send. A few members have already been testing a Teensy++ based adapter on various PCs with mixed results (Kishy has a
list of some).
One thing I discovered was that my BIOS doesn't care if the report is longer than 8 bytes, it simply ignores the rest. That might point the way towards slightly higher compatibility, with the following workaround (for cases where the BIOS doesn't issue a SetProtocol command, or gets it wrong)...
The report sent would consist of 32 bytes, with the standard boot mode 8 byte report first, followed by a complete bitmap of the USB codes (from 1 to 0xA0) and some padding.
The report descriptor, however, would define the report with the 6 key code slots of the boot mode section marked as 'constant'. That way the adapter can still fill them out, but a full HID stack would ignore them.
I'm going to code that up later and try it out on my PCs. They're all relatively recent though, so I'll probably have to deliberately ignore the SetProtocol command to test the kludged method.
Has anyone tried similar before?