diff options
author | IBNobody <ibnobody@gmail.com> | 2016-04-13 19:14:23 -0500 |
---|---|---|
committer | IBNobody <ibnobody@gmail.com> | 2016-04-13 19:14:23 -0500 |
commit | 01f5b35396e5558a39e6f35ef9128b96c289c05c (patch) | |
tree | f897786dddcd310f227ac157e79c7dd717e9b582 /tmk_core/common/action_layer.h | |
parent | 390fd3107a84277151ceb63255c859307221a290 (diff) | |
parent | a0194d7e5ff2f3d242a5c6508abf81b4ddf67a3e (diff) | |
download | qmk_firmware-01f5b35396e5558a39e6f35ef9128b96c289c05c.tar.gz |
Merge remote-tracking branch 'refs/remotes/jackhumbert/master' into pc_planck
Diffstat (limited to 'tmk_core/common/action_layer.h')
-rw-r--r-- | tmk_core/common/action_layer.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h index b6da353cf..3a4b1e334 100644 --- a/tmk_core/common/action_layer.h +++ b/tmk_core/common/action_layer.h @@ -70,6 +70,17 @@ void layer_xor(uint32_t 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); |