Move ActiveLayer back to keyboard_layout.c too
That is the only place we use it from, no need to expose it outside of that. Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
static uint8_t keyMasks[SLOT_COUNT][MAX_KEY_COUNT_PER_MODULE];
|
||||
|
||||
uint8_t ActiveLayer = LAYER_ID_BASE;
|
||||
static uint8_t ActiveLayer = LAYER_ID_BASE;
|
||||
uint8_t prevKeyStates[SLOT_COUNT][MAX_KEY_COUNT_PER_MODULE];
|
||||
|
||||
static inline __attribute__((always_inline)) uhk_key_t getKeycode(uint8_t slotId, uint8_t keyId)
|
||||
@@ -77,7 +77,7 @@ bool handleKey(uhk_key_t key, int scancodeIdx, usb_keyboard_report_t *report, co
|
||||
break;
|
||||
case UHK_KEY_LAYER:
|
||||
if (key_toggled_on(prevKeyStates, currKeyStates, keyId)) {
|
||||
ActiveLayer = layer;
|
||||
ActiveLayer = key.layer.target;
|
||||
}
|
||||
if (key_toggled_off(prevKeyStates, currKeyStates, keyId)) {
|
||||
ActiveLayer = LAYER_ID_BASE;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef __LAYER_H__
|
||||
#define __LAYER_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// Macros:
|
||||
|
||||
#define LAYER_ID_BASE 0
|
||||
@@ -12,6 +10,4 @@
|
||||
|
||||
#define LAYER_COUNT 4
|
||||
|
||||
extern uint8_t ActiveLayer;
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user