]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Workaround for the macOS caps lock delay (#1308)
authorjerryen <Jerry@jerryen.com>
Sat, 20 May 2017 00:24:47 +0000 (17:24 -0700)
committerskullydazed <skullydazed@users.noreply.github.com>
Sat, 20 May 2017 00:24:47 +0000 (17:24 -0700)
* 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.

keyboards/clueboard/config.h
tmk_core/common/action.c

index 38170627774c470245e49532abd9710575471f27..ad683238564ad8a7e956142db9cd7ca1ccedb803 100644 (file)
@@ -42,16 +42,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
     keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
 )
 
-/* How long a "key tap" is. Used in functions like LT() and macros to determine
- * how long QMK "holds down" a tapped key.
- *
- * If you are macOS this should be at least 500ms to avoid macOS's accidental
- * Caps Lock activation prevention measures, as noted by /u/JerryEn here:
- *
- * https://www.reddit.com/r/clueboard/comments/6bfc2m/lt_not_working_with_caps_lock/dhmbp88/
- */
-#define TAPPING_TERM 600 // ms
-
 /*
  * Feature disable options
  *  These options are also useful to firmware size reduction.
index 8640dfab359ababdf9f32f44d26602c9b4cf6a04..a534f818ec00e80910e0b275b039afdf05c03048 100644 (file)
@@ -26,6 +26,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #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");