Description
The Arduino Leonardo Keyboard.write command generates incorrect KeyDown & KeyUp wParam values as follows:
KEY_LEFT_CTRL & KEY_RIGHT_CTRL both generate 17 but should generate 162 & 163 respectively.
KEY_LEFT_SHIFT & KEY_RIGHT_SHIFT both generate 16 but should generate 160 & 161 respectively.
KEY_LEFT_ALT & KEY_RIGHT_ALT both generate 18 but should generate 164 & 165 respectively.
I believe the following should also happen although it may have been done on purpose by the designers.
Keyboard.write() values of 48 to 57 generate the correct codes of 48 to 57 for the main pad keys 0 thru 9.
I believe the values of 166 to 174 should generate the Numpad key values of 96 to 105 but instead they also generate the main pad key ones of 48 to 57.
No other values generate 96 to 105, 160 to 165 so there is no way to generate the Numpad numeric keys or the Left & Right versions of the 3 modifiers.
All the remaining values generate the expected KeyDown/KeyUp wParam values.
These results are all on a Windows 7 system although I suspect that isn't relevant and that they in fact would be true of any Windows system.