Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 5 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
6 years, 5 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