From bd2c0b9648b67db51a92f69bc862c0eb7bccf14c Mon Sep 17 00:00:00 2001 From: Nephiel Date: Wed, 10 May 2017 19:26:39 +0200 Subject: Call led_set for layer action events to update LEDs on layer changes --- tmk_core/common/action.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tmk_core/common/action.c') diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 4ba1cc251a..8640dfab35 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -537,6 +537,21 @@ void process_action(keyrecord_t *record, action_t action) break; } +#ifndef NO_ACTION_LAYER + // if this event is a layer action, update the leds + switch (action.kind.id) { + case ACT_LAYER: + #ifndef NO_ACTION_TAPPING + case ACT_LAYER_TAP: + case ACT_LAYER_TAP_EXT: + #endif + led_set(host_keyboard_leds()); + break; + default: + break; + } +#endif + #ifndef NO_ACTION_ONESHOT /* Because we switch layers after a oneshot event, we need to release the * key before we leave the layer or no key up event will be generated. -- cgit v1.2.3 From 9c284786e728a2e8834745d6bb7df0fda4099cf3 Mon Sep 17 00:00:00 2001 From: jerryen Date: Fri, 19 May 2017 17:24:47 -0700 Subject: Workaround for the macOS caps lock delay (#1308) * Add 80ms delay for KC_CAPS when used as a tap key Workaround for the macOS caps lock delay * Revert "Increase TAPPING_TERM for the Clueboard" This reverts commit a74e69e9fa889113ee31fbc8dc7e6848fdb07576. --- tmk_core/common/action.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tmk_core/common/action.c') diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 8640dfab35..a534f818ec 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -26,6 +26,7 @@ along with this program. If not, see . #include "action_macro.h" #include "action_util.h" #include "action.h" +#include "wait.h" #ifdef DEBUG_ACTION #include "debug.h" @@ -438,6 +439,9 @@ void process_action(keyrecord_t *record, action_t action) } else { if (tap_count > 0) { dprint("KEYMAP_TAP_KEY: Tap: unregister_code\n"); + if (action.layer_tap.code == KC_CAPS) { + wait_ms(80); + } unregister_code(action.layer_tap.code); } else { dprint("KEYMAP_TAP_KEY: No tap: Off on release\n"); -- cgit v1.2.3