From 20dd9c032616722a54174d53b0f8824f639b5263 Mon Sep 17 00:00:00 2001 From: Wojciech Siewierski Date: Sun, 13 Mar 2016 00:18:20 +0100 Subject: process_action may be called either with key cache or without it If one wants to temporarily disable the key cache (for example because it interferes with a macro), `disable_action_cache` must be set to `true`. `process_action_nocache` is a simple wrapper doing just that for a single call. --- tmk_core/common/action.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tmk_core/common/action.h') diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h index 8a4736d7bc..34a794db29 100644 --- a/tmk_core/common/action.h +++ b/tmk_core/common/action.h @@ -59,6 +59,10 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt); void action_function(keyrecord_t *record, uint8_t id, uint8_t opt); /* Utilities for actions. */ +#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS) +extern bool disable_action_cache; +void process_action_nocache(keyrecord_t *record); +#endif void process_action(keyrecord_t *record); void register_code(uint8_t code); void unregister_code(uint8_t code); -- cgit v1.2.3 From 73cb87740bd814c95007f9ef6ce3dcd542a62afd Mon Sep 17 00:00:00 2001 From: Wojciech Siewierski Date: Tue, 15 Mar 2016 16:03:30 +0100 Subject: Always provide an implementation of process_action_nocache --- tmk_core/common/action.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tmk_core/common/action.h') diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h index 34a794db29..533e5d1a01 100644 --- a/tmk_core/common/action.h +++ b/tmk_core/common/action.h @@ -61,8 +61,8 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt); /* Utilities for actions. */ #if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS) extern bool disable_action_cache; -void process_action_nocache(keyrecord_t *record); #endif +void process_action_nocache(keyrecord_t *record); void process_action(keyrecord_t *record); void register_code(uint8_t code); void unregister_code(uint8_t code); -- cgit v1.2.3 From a5cdc3aab1c430916eae66d4d9d751808613e700 Mon Sep 17 00:00:00 2001 From: Wojciech Siewierski Date: Tue, 15 Mar 2016 16:51:50 +0100 Subject: Expose the pressed_actions_cache global variable --- tmk_core/common/action.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tmk_core/common/action.h') diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h index 533e5d1a01..7a60f320e7 100644 --- a/tmk_core/common/action.h +++ b/tmk_core/common/action.h @@ -61,6 +61,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt); /* Utilities for actions. */ #if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS) extern bool disable_action_cache; +extern action_t pressed_actions_cache[MATRIX_ROWS][MATRIX_COLS]; #endif void process_action_nocache(keyrecord_t *record); void process_action(keyrecord_t *record); -- cgit v1.2.3 From b4f442dfeaf4d434ae0d8459dc5199cd8fefc1c7 Mon Sep 17 00:00:00 2001 From: Wojciech Siewierski Date: Sun, 27 Mar 2016 23:50:07 +0200 Subject: Cut the memory consumption of PREVENT_STUCK_MODIFIERS in half --- tmk_core/common/action.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tmk_core/common/action.h') diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h index 7a60f320e7..2b43d001e1 100644 --- a/tmk_core/common/action.h +++ b/tmk_core/common/action.h @@ -61,7 +61,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt); /* Utilities for actions. */ #if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS) extern bool disable_action_cache; -extern action_t pressed_actions_cache[MATRIX_ROWS][MATRIX_COLS]; +extern int8_t pressed_actions_cache[MATRIX_ROWS][MATRIX_COLS]; #endif void process_action_nocache(keyrecord_t *record); void process_action(keyrecord_t *record); -- cgit v1.2.3 From cd8dd1b6d6a68c1d6ba48ba58e6ddad7dbbce6c2 Mon Sep 17 00:00:00 2001 From: Eric-L-T Date: Fri, 1 Apr 2016 13:45:01 -0700 Subject: Update action.h --- tmk_core/common/action.h | 1 - 1 file changed, 1 deletion(-) (limited to 'tmk_core/common/action.h') diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h index 2b43d001e1..533e5d1a01 100644 --- a/tmk_core/common/action.h +++ b/tmk_core/common/action.h @@ -61,7 +61,6 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt); /* Utilities for actions. */ #if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS) extern bool disable_action_cache; -extern int8_t pressed_actions_cache[MATRIX_ROWS][MATRIX_COLS]; #endif void process_action_nocache(keyrecord_t *record); void process_action(keyrecord_t *record); -- cgit v1.2.3