forked from mirrors/qmk_userspace
Refactor the source layer cache encoding
This commit is contained in:
parent
47dd29513e
commit
567f256c5d
3 changed files with 71 additions and 41 deletions
|
@ -70,6 +70,14 @@ 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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue