aboutsummaryrefslogtreecommitdiffstats
path: root/tmk_core/common/action_layer.c
diff options
context:
space:
mode:
authorGravatar Damien <Dbroqua@users.noreply.github.com>2017-03-05 22:58:13 +0100
committerGravatar GitHub <noreply@github.com>2017-03-05 22:58:13 +0100
commit24ec8f509703cbaf9de7b41d251dbb7fcd339559 (patch)
tree90f4f9adf406d92c6817c412256904a97c716daf /tmk_core/common/action_layer.c
parentb7b94bfb132aa5f2f79b587fcfa6b1197485db27 (diff)
parent615bfc4eca8204b73c592a076ca02aeaeceb7e1e (diff)
downloadqmk_firmware-24ec8f509703cbaf9de7b41d251dbb7fcd339559.tar.gz
Merge pull request #18 from qmk/master
Merge from qmk
Diffstat (limited to 'tmk_core/common/action_layer.c')
-rw-r--r--tmk_core/common/action_layer.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c
index a3c757964..58d919a04 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;