Add layer_state_set_kb hook
This commit is contained in:
parent
4010360912
commit
d369bfb83a
2 changed files with 8 additions and 0 deletions
|
@ -57,8 +57,14 @@ void default_layer_xor(uint32_t state)
|
||||||
*/
|
*/
|
||||||
uint32_t layer_state = 0;
|
uint32_t layer_state = 0;
|
||||||
|
|
||||||
|
__attribute__((weak))
|
||||||
|
uint32_t layer_state_set_kb(uint32_t state) {
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
static void layer_state_set(uint32_t state)
|
static void layer_state_set(uint32_t state)
|
||||||
{
|
{
|
||||||
|
state = layer_state_set_kb(state);
|
||||||
dprint("layer_state: ");
|
dprint("layer_state: ");
|
||||||
layer_debug(); dprint(" to ");
|
layer_debug(); dprint(" to ");
|
||||||
layer_state = state;
|
layer_state = state;
|
||||||
|
|
|
@ -69,6 +69,8 @@ void layer_xor(uint32_t state);
|
||||||
#define layer_xor(state)
|
#define layer_xor(state)
|
||||||
#define layer_debug()
|
#define layer_debug()
|
||||||
|
|
||||||
|
__attribute__((weak))
|
||||||
|
void layer_state_set_kb(uint32_t oldstate, uint32_t newstate);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* pressed actions cache */
|
/* pressed actions cache */
|
||||||
|
|
Loading…
Reference in a new issue