summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tmk_core/common/action_layer.c4
-rw-r--r--tmk_core/common/action_layer.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c
index 6ff8c5549b..47cad996a3 100644
--- a/tmk_core/common/action_layer.c
+++ b/tmk_core/common/action_layer.c
@@ -296,7 +296,7 @@ action_t store_or_get_action(bool pressed, keypos_t key) {
*
* Gets the layer based on key info
*/
-int8_t layer_switch_get_layer(keypos_t key) {
+uint8_t layer_switch_get_layer(keypos_t key) {
#ifndef NO_ACTION_LAYER
action_t action;
action.code = ACTION_TRANSPARENT;
@@ -304,7 +304,7 @@ int8_t layer_switch_get_layer(keypos_t key) {
uint32_t layers = layer_state | default_layer_state;
/* check top layer first */
for (int8_t i = 31; i >= 0; i--) {
- if (layers & (1UL<<i)) {
+ if (layers & (1UL << i)) {
action = action_for_key(i, key);
if (action.code != ACTION_TRANSPARENT) {
return i;
diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h
index f1551d2519..6e2f35d90d 100644
--- a/tmk_core/common/action_layer.h
+++ b/tmk_core/common/action_layer.h
@@ -97,7 +97,7 @@ uint8_t read_source_layers_cache(keypos_t key);
action_t store_or_get_action(bool pressed, keypos_t key);
/* return the topmost non-transparent layer currently associated with key */
-int8_t layer_switch_get_layer(keypos_t key);
+uint8_t layer_switch_get_layer(keypos_t key);
/* return action depending on current layer status */
action_t layer_switch_get_action(keypos_t key);