diff options
author | Jack Humbert <jack.humb@gmail.com> | 2017-02-14 21:33:04 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-14 21:33:04 -0500 |
commit | 7bef285553dee01bbcb1eaadefbfb39ed75baea4 (patch) | |
tree | db88439016027f630fc82c5876a8f3248b5d3d27 /tmk_core/common/action_layer.c | |
parent | fd2925efbac0d7963f3d267dd5264f08a0a4e9dc (diff) | |
parent | bd8d717f1ff2eef42dfef490374a8cee61be5d87 (diff) |
Merge pull request #1101 from priyadi/layer_state_set_kb
Add weak layer_state_set_kb hook
Diffstat (limited to 'tmk_core/common/action_layer.c')
-rw-r--r-- | tmk_core/common/action_layer.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c index a3c7579642..58d919a04d 100644 --- a/tmk_core/common/action_layer.c +++ b/tmk_core/common/action_layer.c @@ -16,8 +16,14 @@ */ uint32_t default_layer_state = 0; +__attribute__((weak)) +uint32_t default_layer_state_set_kb(uint32_t state) { + return state; +} + static void default_layer_state_set(uint32_t state) { + state = default_layer_state_set_kb(state); debug("default_layer_state: "); default_layer_debug(); debug(" to "); default_layer_state = state; @@ -57,8 +63,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; |