I have a STM32 demo board and I trying to configure it as a USB keyboard. I am developing it for an RTOS host system.
This is the keyboard IN report format according to the standard.
unsigned char hid_report[8]; hid_report[0]=0xE1;//E1 is scan code for shift modifier key hid_report[1]=0x00;//reserved hid_report[2]=0x04;//04 is scan code for 'a'/'A' hid_report[3]=0x00; hid_report[4]=0x00; hid_report[5]=0x00; hid_report[6]=0x00; hid_report[7]=0x00;
But if I send this to RTOS host,the system gets hanged.I tried it on Windows and the SHIFT key doesn't seem to be working.
On the other hand if I send the report as
unsigned char hid_report[8]; hid_report[0]=0x00; hid_report[1]=0x00;//reserved hid_report[2]=0xE1;//E1 is scan code for shift modifier key hid_report[3]=0x04;//04 is scan code for 'a'/'A' hid_report[4]=0x00; hid_report[5]=0x00; hid_report[6]=0x00; hid_report[7]=0x00;
In RTOS it seems to be working fine(Capital 'A' is being sent).But in Windows SHIFT key still doesn't work.
Anybody knows why is it behaving differently for two different OS and Why is it not working according to the standard?
Microsoft's interpretation vs yours? They tend to code quite rigidly, and then that becomes the "standard" if you want your product to "work".