Skip to content

Commit 906286f

Browse files
committed
Added support for the logo key to the keyboard
Minor change - List of key modifiers updated to include the logo/GUI/windows key. Also added the options to specify the right hand versions of the keys rather than just the left if for some reason someone wants to do this. Changes are limited to the keyboard header file and are backwards compatible. The new modifier values are in line with the table given on page 56 of this document http://www.usb.org/developers/hidpage/HID1_11.pdf
1 parent 4980276 commit 906286f

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

features/unsupported/USBDevice/USBHID/USBKeyboard.h

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,16 @@
2222
#include "USBHID.h"
2323
#include "Stream.h"
2424

25-
/* Modifiers */
25+
/* Modifiers, left keys then right keys. */
2626
enum MODIFIER_KEY {
27-
KEY_CTRL = 1,
28-
KEY_SHIFT = 2,
29-
KEY_ALT = 4,
27+
KEY_CTRL = 0x01,
28+
KEY_SHIFT = 0x02,
29+
KEY_ALT = 0x04,
30+
KEY_LOGO = 0x08,
31+
KEY_RCTRL = 0x10,
32+
KEY_RSHIFT = 0x20,
33+
KEY_RALT = 0x40,
34+
KEY_RLOGO = 0x80,
3035
};
3136

3237

0 commit comments

Comments
 (0)