aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/ClassDriver
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-02-07 07:31:53 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-02-07 07:31:53 +0000
commit196724c62d8c09b30dabb9a8ff3246033d95315f (patch)
tree8653258b081df65de182502705e1475eb3ac51ce /Demos/Device/ClassDriver
parent7602566a05616e55a943422c783e072b49cadb1d (diff)
downloadlufa-196724c62d8c09b30dabb9a8ff3246033d95315f.tar.gz
lufa-196724c62d8c09b30dabb9a8ff3246033d95315f.tar.bz2
lufa-196724c62d8c09b30dabb9a8ff3246033d95315f.zip
Added keyboard modifier masks (HID_KEYBOARD_MODIFER_*) to the HID class driver and Keyboard demos.
Diffstat (limited to 'Demos/Device/ClassDriver')
-rw-r--r--Demos/Device/ClassDriver/Keyboard/Keyboard.c2
-rw-r--r--Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c2
-rw-r--r--Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c2
3 files changed, 6 insertions, 0 deletions
diff --git a/Demos/Device/ClassDriver/Keyboard/Keyboard.c b/Demos/Device/ClassDriver/Keyboard/Keyboard.c
index 4b295a2a8..7e5834868 100644
--- a/Demos/Device/ClassDriver/Keyboard/Keyboard.c
+++ b/Demos/Device/ClassDriver/Keyboard/Keyboard.c
@@ -147,6 +147,8 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
uint8_t UsedKeyCodes = 0;
+ KeyboardReport->Modifier = HID_KEYBOARD_MODIFER_LEFTSHIFT;
+
if (JoyStatus_LCL & JOY_UP)
KeyboardReport->KeyCode[UsedKeyCodes++] = 0x04; // A
else if (JoyStatus_LCL & JOY_DOWN)
diff --git a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c
index dcdf88682..8e91d1229 100644
--- a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c
+++ b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c
@@ -180,6 +180,8 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
if (!(ButtonStatus_LCL & BUTTONS_BUTTON1))
return 0;
+ KeyboardReport->Modifier = HID_KEYBOARD_MODIFER_LEFTSHIFT;
+
if (JoyStatus_LCL & JOY_UP)
KeyboardReport->KeyCode[0] = 0x04; // A
else if (JoyStatus_LCL & JOY_DOWN)
diff --git a/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c b/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c
index 683ab66f7..0f0d62469 100644
--- a/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c
+++ b/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c
@@ -192,6 +192,8 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
uint8_t JoyStatus_LCL = Joystick_GetStatus();
uint8_t ButtonStatus_LCL = Buttons_GetStatus();
+ KeyboardReport->Modifier = HID_KEYBOARD_MODIFER_LEFTSHIFT;
+
if (JoyStatus_LCL & JOY_UP)
KeyboardReport->KeyCode[0] = 0x04; // A
else if (JoyStatus_LCL & JOY_DOWN)