X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;ds=inline;f=common%2Faction.c;h=4fafbfa79f58f86a0c1cf1638f859efa2fc3b1f2;hb=f0c5f1b910ecf9536e5b95cc4ca9a43b0f4b2c36;hp=15e125a3ec917d41a1e880ac9ed860bab6182bb0;hpb=1aa067e5414873559f59e310f38bb43e8803a45f;p=max%2Ftmk_keyboard.git
diff --git a/common/action.c b/common/action.c
index 15e125a3..4fafbfa7 100644
--- a/common/action.c
+++ b/common/action.c
@@ -23,6 +23,7 @@ along with this program. If not, see .
#include "command.h"
#include "util.h"
#include "debug.h"
+#include "led.h"
#include "layer_switch.h"
#include "action_macro.h"
#include "action.h"
@@ -889,6 +890,18 @@ void register_code(uint8_t code)
if (code == KC_NO) {
return;
}
+#ifdef CAPSLOCK_LOCKING_ENABLE
+ else if (KC_LOCKING_CAPS == code) {
+#ifdef CAPSLOCK_LOCKING_RESYNC_ENABLE
+ // Resync: ignore if caps lock already is on
+ if (host_keyboard_leds() & (1<