Added keyboard modifier masks (HID_KEYBOARD_MODIFER_*) to the HID class driver and Keyboard demos.

This commit is contained in:
Dean Camera 2010-02-07 07:31:53 +00:00
parent 7602566a05
commit 196724c62d
10 changed files with 131 additions and 44 deletions

View file

@ -221,6 +221,9 @@ void Keyboard_HID_Task(void)
/* Check if board button is not pressed, if so mouse mode enabled */
if (!(Buttons_GetStatus() & BUTTONS_BUTTON1))
{
/* Make sent key uppercase by indicating that the left shift key is pressed */
KeyboardReportData.Modifier = KEYBOARD_MODIFER_LEFTSHIFT;
if (JoyStatus_LCL & JOY_UP)
KeyboardReportData.KeyCode[0] = 0x04; // A
else if (JoyStatus_LCL & JOY_DOWN)