File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change 2121#ifndef KEYBOARD_DEFS_H
2222#define KEYBOARD_DEFS_H
2323
24+ #include "esp_bit_defs.h"
25+
2426#define REPORT_ID_KEYBOARD 1
2527#define REPORT_ID_VOLUME 3
2628
2729/* Modifiers */
2830enum MODIFIER_KEY {
29- KEY_CTRL = 1 ,
30- KEY_SHIFT = 2 ,
31- KEY_ALT = 4 ,
31+ /* Aliases for the left modifiers */
32+ KEY_CTRL = BIT (0 ),
33+ KEY_SHIFT = BIT (1 ),
34+ KEY_ALT = BIT (2 ),
35+ KEY_GUI = BIT (3 ), /*!< GUI key (Command on macOS, Windows key on Windows) */
36+ /* Left modifiers */
37+ KEY_LEFT_CTRL = BIT (0 ),
38+ KEY_LEFT_SHIFT = BIT (1 ),
39+ KEY_LEFT_ALT = BIT (2 ),
40+ KEY_LEFT_GUI = BIT (3 ),
41+ /* Right modifiers */
42+ KEY_RIGHT_CTRL = BIT (4 ),
43+ KEY_RIGHT_SHIFT = BIT (5 ),
44+ KEY_RIGHT_ALT = BIT (6 ),
45+ KEY_RIGHT_GUI = BIT (7 ),
3246};
3347
3448enum MEDIA_KEY {
You can’t perform that action at this time.
0 commit comments