summaryrefslogtreecommitdiff
path: root/tmk_core/common
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2018-08-27 09:16:54 -0700
committerJack Humbert <jack.humb@gmail.com>2018-10-01 12:58:46 -0400
commit4318797d198b58bb807b3e436c7d8924d8b4a6fe (patch)
tree8c9b1aea160dffd308e59dc61d79c3fb897465b6 /tmk_core/common
parentda6c58175a74e4bb5a6c67f7e8b63567c14800d7 (diff)
downloadqmk_firmware-4318797d198b58bb807b3e436c7d8924d8b4a6fe.tar.gz
qmk_firmware-4318797d198b58bb807b3e436c7d8924d8b4a6fe.zip
Add user level to default_layer_state_set
Diffstat (limited to 'tmk_core/common')
-rw-r--r--tmk_core/common/action_layer.c11
-rw-r--r--tmk_core/common/action_layer.h2
2 files changed, 12 insertions, 1 deletions
diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c
index 62375dfbfe..b8dcb34f3a 100644
--- a/tmk_core/common/action_layer.c
+++ b/tmk_core/common/action_layer.c
@@ -15,13 +15,22 @@
*/
uint32_t default_layer_state = 0;
+/** \brief Default Layer State Set At user Level
+ *
+ * FIXME: Needs docs
+ */
+__attribute__((weak))
+uint32_t default_layer_state_set_user(uint32_t state) {
+ return state;
+}
+
/** \brief Default Layer State Set At Keyboard Level
*
* FIXME: Needs docs
*/
__attribute__((weak))
uint32_t default_layer_state_set_kb(uint32_t state) {
- return state;
+ return default_layer_state_set_user(state);
}
/** \brief Default Layer State Set
diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h
index 7bf116be2d..6d48321f92 100644
--- a/tmk_core/common/action_layer.h
+++ b/tmk_core/common/action_layer.h
@@ -31,6 +31,8 @@ void default_layer_set(uint32_t state);
__attribute__((weak))
uint32_t default_layer_state_set_kb(uint32_t state);
+__attribute__((weak))
+uint32_t default_layer_state_set_user(uint32_t state);
#ifndef NO_ACTION_LAYER
/* bitwise operation */