From 017458a07bda3f4b2604d079ec65ef607a1a1e57 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sat, 17 Jun 2017 15:19:15 +0300 Subject: Move functionality from action_util to report The functions also takes report_kebyoard_t parameters, so that they can be used elsewhere. --- tmk_core/common/action_util.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'tmk_core/common/action_util.h') diff --git a/tmk_core/common/action_util.h b/tmk_core/common/action_util.h index dd0c4c2bfe..8fb88c0f65 100644 --- a/tmk_core/common/action_util.h +++ b/tmk_core/common/action_util.h @@ -82,9 +82,7 @@ uint8_t get_oneshot_layer_state(void); bool has_oneshot_layer_timed_out(void); /* inspect */ -uint8_t has_anykey(void); uint8_t has_anymod(void); -uint8_t get_first_key(void); #ifdef __cplusplus } -- cgit v1.2.3 From fb95d86b39074b581455fb35a17477cce79a3738 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sat, 17 Jun 2017 17:55:44 +0300 Subject: Move functions for adding keys from to reports to report.h --- tmk_core/common/action_util.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'tmk_core/common/action_util.h') diff --git a/tmk_core/common/action_util.h b/tmk_core/common/action_util.h index 8fb88c0f65..3458931514 100644 --- a/tmk_core/common/action_util.h +++ b/tmk_core/common/action_util.h @@ -29,9 +29,17 @@ extern report_keyboard_t *keyboard_report; void send_keyboard_report(void); /* key */ -void add_key(uint8_t key); -void del_key(uint8_t key); -void clear_keys(void); +inline void add_key(uint8_t key) { + add_key_to_report(keyboard_report, key); +} + +inline void del_key(uint8_t key) { + del_key_from_report(keyboard_report, key); +} + +inline void clear_keys(void) { + clear_keys_from_report(keyboard_report); +} /* modifier */ uint8_t get_mods(void); -- cgit v1.2.3