aboutsummaryrefslogtreecommitdiff
path: root/common/action_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/action_util.h')
-rw-r--r--common/action_util.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/common/action_util.h b/common/action_util.h
new file mode 100644
index 000000000..939bc2b66
--- /dev/null
+++ b/common/action_util.h
@@ -0,0 +1,56 @@
1/*
2Copyright 2013 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17#ifndef ACTION_UTIL_H
18#define ACTION_UTIL_H
19
20#include <stdint.h>
21
22extern report_keyboard_t *keyboard_report;
23
24void send_keyboard_report(void);
25
26/* key */
27void add_key(uint8_t key);
28void del_key(uint8_t key);
29void clear_keys(void);
30
31/* modifier */
32uint8_t get_mods(void);
33void add_mods(uint8_t mods);
34void del_mods(uint8_t mods);
35void set_mods(uint8_t mods);
36void clear_mods(void);
37
38/* weak modifier */
39uint8_t get_weak_mods(void);
40void add_weak_mods(uint8_t mods);
41void del_weak_mods(uint8_t mods);
42void set_weak_mods(uint8_t mods);
43void clear_weak_mods(void);
44
45/* oneshot modifier */
46void set_oneshot_mods(uint8_t mods);
47void clear_oneshot_mods(void);
48void oneshot_toggle(void);
49void oneshot_enable(void);
50void oneshot_disable(void);
51
52/* inspect */
53uint8_t has_anykey(void);
54uint8_t has_anymod(void);
55uint8_t get_first_key(void);
56#endif