all repos — qmk-config @ d12c5f64a68e96c623d6bf53e9d90a0d95ccb692

qmk configs

trying out tap dance
Prithu Goswami pg@prithu.dev
Sat, 19 Nov 2022 23:50:28 +0530
commit

d12c5f64a68e96c623d6bf53e9d90a0d95ccb692

parent

f67ce2ff367b53597d5d2475718259c50825640b

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

@@ -29,8 +29,10 @@ // #define MASTER_RIGHT

// #define EE_HANDS //#define TAPPING_FORCE_HOLD -#define TAPPING_TERM 200 +#define TAPPING_TERM 175 +#define TAPPING_TERM_PER_KEY #define IGNORE_MOD_TAP_INTERRUPT +#define UNICODE_SELECTED_MODES UC_LNX #ifdef RGBLIGHT_ENABLE #define RGBLIGHT_EFFECT_BREATHING
M crkbd/keymaps/prithugoswami/keymap.ccrkbd/keymaps/prithugoswami/keymap.c

@@ -19,6 +19,40 @@

#include QMK_KEYBOARD_H #include <stdio.h> +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QK_TAP_DANCE ... QK_TAP_DANCE_MAX: + return 130; + default: + return TAPPING_TERM; + } +} + +// Tap Dance declarations +enum { + TD_EMDASH, +}; + +void dance_em_dash(qk_tap_dance_state_t *state, void *user_data) { + switch(state->count) { + case 1: + tap_code(KC_MINS); + break; + case 2: + send_unicode_string("—"); + break; + case 3: + send_unicode_string("₹"); + break; + } +} + +// Tap Dance definitions +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_EMDASH] = ACTION_TAP_DANCE_FN(dance_em_dash) +}; + + // TEMPLATE // ,-----------------------------------------------------. ,-----------------------------------------------------. // | | | | | | | | | | | | | |

@@ -49,14 +83,14 @@ ),

[2] = LAYOUT_split_3x6_3( KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, - KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, + KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TD(TD_EMDASH), KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_TILD, MO(4), KC_LGUI, LT(4, KC_ENT), _______, _______, KC_RALT ), [3] = LAYOUT_split_3x6_3( KC_TAB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_7, KC_8, KC_9, XXXXXXX, XXXXXXX, - KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_0, KC_4, KC_5, KC_6, XXXXXXX, XXXXXXX, + KC_LCTL, XXXXXXX, XXXXXXX, KC_LSFT, XXXXXXX, XXXXXXX, KC_0, KC_4, KC_5, KC_6, XXXXXXX, XXXXXXX, KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, XXXXXXX, XXXXXXX, _______, KC_LGUI, KC_ENT, _______, _______, KC_RALT ),
M crkbd/keymaps/prithugoswami/rules.mkcrkbd/keymaps/prithugoswami/rules.mk

@@ -1,7 +1,9 @@

MOUSEKEY_ENABLE = yes # Mouse keys RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +TAP_DANCE_ENABLE = yes +UNICODE_ENABLE = yes # VIA_ENABLE = yes -DYNAMIC_TAPPING_TERM_ENABLE = yes +# DYNAMIC_TAPPING_TERM_ENABLE = yes OLED_ENABLE = no OLED_DRIVER = SSD1306 LTO_ENABLE = yes