diff options
author | Priyadi Iman Nurcahyo <priyadi@priyadi.net> | 2017-02-15 05:11:24 +0700 |
---|---|---|
committer | Priyadi Iman Nurcahyo <priyadi@priyadi.net> | 2017-02-15 05:11:24 +0700 |
commit | 5e310746339bcc37385bc6cd3e0a09fbdf1c273b (patch) | |
tree | 77085a47bb8f475d0ac0703ade96def4cb7d01a4 /tmk_core/common | |
parent | df311c7b40cb6e611a522331dca9836f6eef9dce (diff) | |
parent | d369bfb83a74d94ed0fbb13f8ee3a8a1146da770 (diff) |
Merge branch 'layer_state_set_kb' into promethium
Diffstat (limited to 'tmk_core/common')
-rw-r--r-- | tmk_core/common/action_layer.c | 6 | ||||
-rw-r--r-- | tmk_core/common/action_layer.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c index a3c7579642..3363a2e532 100644 --- a/tmk_core/common/action_layer.c +++ b/tmk_core/common/action_layer.c @@ -57,8 +57,14 @@ void default_layer_xor(uint32_t state) */ 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) { + state = layer_state_set_kb(state); dprint("layer_state: "); layer_debug(); dprint(" to "); layer_state = state; diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h index 025cf5420f..fc714700da 100644 --- a/tmk_core/common/action_layer.h +++ b/tmk_core/common/action_layer.h @@ -69,6 +69,8 @@ void layer_xor(uint32_t state); #define layer_xor(state) #define layer_debug() +__attribute__((weak)) +void layer_state_set_kb(uint32_t oldstate, uint32_t newstate); #endif /* pressed actions cache */ |