]> git.gir.st - tmk_keyboard.git/blob - keyboard.h
added protocol stack: pjrc, vusb
[tmk_keyboard.git] / keyboard.h
1 #ifndef KEYBOARD_H
2 #define KEYBOARD_H
3
4 #include <stdint.h>
5 #include <stdbool.h>
6 #include "host.h"
7
8
9 /* keyboard Modifiers in boot protocol report */
10 #define BIT_LCTRL (1<<0)
11 #define BIT_LSHIFT (1<<1)
12 #define BIT_LALT (1<<2)
13 #define BIT_LGUI (1<<3)
14 #define BIT_RCTRL (1<<4)
15 #define BIT_RSHIFT (1<<5)
16 #define BIT_RALT (1<<6)
17 #define BIT_RGUI (1<<7)
18 #define BIT_LCTL BIT_LCTRL
19 #define BIT_RCTL BIT_RCTRL
20 #define BIT_LSFT BIT_LSHIFT
21 #define BIT_RSFT BIT_RSHIFT
22
23
24 extern report_keyboard_t *keyboard_report;
25 extern report_keyboard_t *keyboard_report_prev;
26
27 void keyboard_set_led(uint8_t led);
28 void keyboard_send(void);
29
30 void keyboard_add_key(uint8_t key);
31 void keyboard_add_mod_bit(uint8_t mod);
32 void keyboard_set_mods(uint8_t mods);
33 void keyboard_add_code(uint8_t code);
34 void keyboard_swap_report(void);
35 void keyboard_clear_report(void);
36
37 uint8_t keyboard_has_anykey(void);
38 uint8_t *keyboard_get_keys(void);
39 uint8_t keyboard_get_mods(void);
40
41 #endif
42
43
Imprint / Impressum