From 02d44beb4410b806cb8c38e272941d212fee8a74 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 14 Dec 2018 09:01:58 -0800 Subject: Fix up tap_code functionality (#4609) * Add delay in Tap Code to avoid issues I think a few people have reporting issues with it working properly, and it may be a timing issue. The 'register_code' uses this sort of delay in some of the functions, and this is probably why. Adding the 100ms delay should hopefully fix any issues with it. * Make tap_code delay configurable * Update documentation * Bring tap_code16 inline with changes * Fix type for tap_code16 Bad copy-paste job * Just use the value check for the define * Clarify timing in docs Co-Authored-By: drashna * Wordsmithing Co-Authored-By: drashna --- docs/config_options.md | 2 ++ docs/feature_macros.md | 2 ++ 2 files changed, 4 insertions(+) (limited to 'docs') diff --git a/docs/config_options.md b/docs/config_options.md index b811fa877..69fecc8b4 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -160,6 +160,8 @@ If you define these options you will enable the associated feature, which may in * Set this to the number of combos that you're using in the [Combo](feature_combo.md) feature. * `#define COMBO_TERM 200` * how long for the Combo keys to be detected. Defaults to `TAPPING_TERM` if not defined. +* `#define TAP_CODE_DELAY 100` + * Sets the delay between `register_code` and `unregister_code`, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds. ## RGB Light Configuration diff --git a/docs/feature_macros.md b/docs/feature_macros.md index 29ba29fef..aa13fb97f 100644 --- a/docs/feature_macros.md +++ b/docs/feature_macros.md @@ -250,6 +250,8 @@ Parallel to `register_code` function, this sends the `` keyup event to the c This will send `register_code()` and then `unregister_code()`. This is useful if you want to send both the press and release events ("tap" the key, rather than hold it). +If you're having issues with taps (un)registering, you can add a delay between the register and unregister events by setting `#define TAP_CODE_DELAY 100` in your `config.h` file. The value is in milliseconds. + ### `clear_keyboard();` This will clear all mods and keys currently pressed. -- cgit v1.2.3-24-g4f1b