diff options
author | Chris Browne <cbbrowne@hpaq.int.linuxdatabases.info> | 2016-10-10 17:18:15 -0400 |
---|---|---|
committer | Chris Browne <cbbrowne@hpaq.int.linuxdatabases.info> | 2016-10-10 17:18:15 -0400 |
commit | 4b682ea63e2b3dd0bc1132917be7985ce0da57a6 (patch) | |
tree | 6d79874c5542148c27907511ecdb2e9e5e12b24b /tmk_core/common/action_layer.h | |
parent | 04759d63ef9b520fc41d76de64bb65198448fc1c (diff) | |
parent | a9df99b81c787862dc3fa11bd854fe39e704da81 (diff) |
Merge branch 'master' of github.com:cbbrowne/qmk_firmware
Diffstat (limited to 'tmk_core/common/action_layer.h')
-rw-r--r-- | tmk_core/common/action_layer.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h index b6da353cfd..025cf5420f 100644 --- a/tmk_core/common/action_layer.h +++ b/tmk_core/common/action_layer.h @@ -68,8 +68,20 @@ void layer_xor(uint32_t state); #define layer_and(state) #define layer_xor(state) #define layer_debug() + +#endif + +/* pressed actions cache */ +#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS) +/* The number of bits needed to represent the layer number: log2(32). */ +#define MAX_LAYER_BITS 5 +void update_source_layers_cache(keypos_t key, uint8_t layer); +uint8_t read_source_layers_cache(keypos_t key); #endif +action_t store_or_get_action(bool pressed, keypos_t key); +/* return the topmost non-transparent layer currently associated with key */ +int8_t layer_switch_get_layer(keypos_t key); /* return action depending on current layer status */ action_t layer_switch_get_action(keypos_t key); |