all repos — qmk-config @ 832596cd0e41a3c50608ea00570b64cf2ff56b38

qmk configs

add per-key tap term
Prithu Goswami pg@prithu.dev
Wed, 07 Dec 2022 23:46:42 +0530
commit

832596cd0e41a3c50608ea00570b64cf2ff56b38

parent

ec7b8283b90da99b7b0a7c25edb5256df5dba4fd

2 files changed, 14 insertions(+), 5 deletions(-)

jump to
M crkbd/keymaps/prithugoswami/config.hcrkbd/keymaps/prithugoswami/config.h

@@ -29,20 +29,17 @@ // #define MASTER_RIGHT

// #define EE_HANDS //#define TAPPING_FORCE_HOLD -#define TAPPING_TERM 175 +#define TAPPING_TERM 195 #define TAPPING_TERM_PER_KEY #define IGNORE_MOD_TAP_INTERRUPT #define UNICODE_SELECTED_MODES UC_LNX +#define PERMISSIVE_HOLD #ifdef RGBLIGHT_ENABLE #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD #define RGBLIGHT_EFFECT_RAINBOW_SWIRL - #define RGBLIGHT_EFFECT_SNAKE - #define RGBLIGHT_EFFECT_KNIGHT - #define RGBLIGHT_EFFECT_CHRISTMAS #define RGBLIGHT_EFFECT_STATIC_GRADIENT - #define RGBLIGHT_EFFECT_RGB_TEST #define RGBLIGHT_EFFECT_ALTERNATING #define RGBLIGHT_EFFECT_TWINKLE #define RGBLIGHT_LIMIT_VAL 120
M crkbd/keymaps/prithugoswami/keymap.ccrkbd/keymaps/prithugoswami/keymap.c

@@ -17,12 +17,24 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

*/ #include QMK_KEYBOARD_H +#include "raw_hid.h" #include <stdio.h> + +void raw_hid_receive(uint8_t *data, uint8_t length) { + rgblight_setrgb(data[0], data[1], data[2]); + return; +} uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QK_TAP_DANCE ... QK_TAP_DANCE_MAX: return 130; + case LT(2, KC_SPC): + case LT(1, KC_ENT): + return 175; + case LALT_T(KC_L): + case LALT_T(KC_S): + return 210; default: return TAPPING_TERM; }