]>
git.gir.st - tmk_keyboard.git/blob - host.h
7 /* keyboard Modifiers in boot protocol report */
8 #define BIT_LCTRL (1<<0)
9 #define BIT_LSHIFT (1<<1)
10 #define BIT_LALT (1<<2)
11 #define BIT_LGUI (1<<3)
12 #define BIT_RCTRL (1<<4)
13 #define BIT_RSHIFT (1<<5)
14 #define BIT_RALT (1<<6)
15 #define BIT_RGUI (1<<7)
16 #define BIT_LCTL BIT_LCTRL
17 #define BIT_RCTL BIT_RCTRL
18 #define BIT_LSFT BIT_LSHIFT
19 #define BIT_RSFT BIT_RSHIFT
22 #define MOUSE_BTN1 (1<<0)
23 #define MOUSE_BTN2 (1<<1)
24 #define MOUSE_BTN3 (1<<2)
25 #define MOUSE_BTN4 (1<<3)
26 #define MOUSE_BTN5 (1<<4)
29 #if defined(HOST_PJRC)
31 # if defined(KBD2_REPORT_KEYS) && KBD2_REPORT_KEYS > KBD_REPORT_KEYS
32 # define REPORT_KEYS KBD2_REPORT_KEYS
34 # define REPORT_KEYS KBD_REPORT_KEYS
36 #elif defined(HOST_VUSB)
37 # define REPORT_KEYS 6
43 uint8_t keys
[REPORT_KEYS
];
55 #ifdef USB_NKRO_ENABLE
56 extern bool keyboard_nkro
;
59 extern report_keyboard_t
*keyboard_report
;
60 extern report_keyboard_t
*keyboard_report_prev
;
63 uint8_t host_keyboard_leds(void);
65 /* keyboard report operations */
66 void host_add_key(uint8_t key
);
67 void host_add_mod_bit(uint8_t mod
);
68 void host_set_mods(uint8_t mods
);
69 void host_add_code(uint8_t code
);
70 void host_swap_keyboard_report(void);
71 void host_clear_keyboard_report(void);
72 uint8_t host_has_anykey(void);
73 uint8_t host_get_first_key(void);
76 void host_send_keyboard_report(void);
77 void host_mouse_send(report_mouse_t
*report
);