diff options
author | Stephan Bösebeck <sb@caluga.de> | 2016-04-06 22:52:49 +0200 |
---|---|---|
committer | Stephan Bösebeck <sb@caluga.de> | 2016-04-06 22:52:49 +0200 |
commit | 0befb25739ebcec64a3300d60d7c108f6916dee7 (patch) | |
tree | 222fd634cf50c584ceb7925bb8e61a9f266830de /tmk_core/common/action_layer.h | |
parent | 75c24499f3fcb4ad2156875fb529f87a5d99fe9f (diff) | |
parent | 153a6fb0d3e9b54c4d6241c44ffdb9ce8a65de7f (diff) |
Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
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 b6da353cfd..3a4b1e3349 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); |