I have a "mystery box" that I know very little about. I need to get the Leonardo to function with the box while it's in BIOS setup. I downloaded the USBSerPassThruLine project from GitHub (usb-metamorph/USBSerPassThruLine at master · gdsports/usb-metamorph · GitHub) and that appears to work with every BIOS setup known to mankind except for my special box.
Every keystroke is accompanied by an implicit SHIFT. So if I call Keyboard.press('a') I get 'A'.
Or for Keyboard.press('3') I get '#'.
I've tried being as direct as possible with my own simple press() routine:
void sendReport(KeyReport* keys)
{
HID().SendReport(2,keys,sizeof(KeyReport));
}
KeyReport rawdata;
size_t press()
{
uint8_t i;
memset(&rawdata, 0, sizeof(KeyReport));
//#define KEY_MOD_LCTRL 0x01
//#define KEY_MOD_LSHIFT 0x02
//#define KEY_MOD_LALT 0x04
//#define KEY_MOD_LMETA 0x08
//#define KEY_MOD_RCTRL 0x10
//#define KEY_MOD_RSHIFT 0x20
//#define KEY_MOD_RALT 0x40
//#define KEY_MOD_RMETA 0x80
// rawdata.modifiers = KEY_MOD_RSHIFT;
for (i=0; i<6; i++) {
rawdata.keys[i] = KEY_1+i;
}
sendReport(&rawdata);
}
All to no avail.
I still get: '!@#$%^' (instead of '123456')
Any ideas?
BTW, the strangle thing is that this BIOS setup works with any USB keyboard I plug into the box. Is there some older standard this box could be using?