5 years, 9 months ago.

USBKeyboard How Send "Shift" only.

I'm trying to make a game console. I'm using the library "USBKeyboard.h". Tell me please, how to send the click of the button "Left_Shift" or "Right_Shift" ?

If possible, how do I combine this in the constants list?

e. c. char key_s[] = {'0', '1', '2', 'a', 's', 'Left_Shift', 'Right_Shift'};

1 Answer

5 years, 9 months ago.

send a char of 0xe1 for left shift or 0xe5 for right shift.

codes 0xe0 to 0xe7 represent LEFTCTRL, LEFTSHIFT, LEFTALT, LEFTMETA, RIGHTCTRL, RIGHTSHIFT, RIGHTALT and RIGHTMETA

Accepted Answer

char key_s[] = {0, 224, 225, 226, 227, 228, 229}; My notepad resived "[" as 224 and "\" as 229. Codes 225-228 nothing is displayed.

posted by Павел Орьев 19 Jul 2018