diff options
author | Didier Loiseau <didierloiseau+git@gmail.com> | 2016-09-11 01:26:47 +0200 |
---|---|---|
committer | Didier Loiseau <didierloiseau+git@gmail.com> | 2016-09-11 01:26:47 +0200 |
commit | b9014c757599ca288be07629ad1d00ef66c033f1 (patch) | |
tree | ba056e704e76327c597e25d1be200c4c991efeb8 /tmk_core/common/action_layer.h | |
parent | 60a826923d5a6b0dbe416b0837608149ab82e470 (diff) | |
parent | 5010df3d8b68a53c382b853c7c2e45922975b631 (diff) |
Merge remote-tracking branch 'remotes/jackhumbert/master' into bépo
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); |