diff options
author | Ibnu Daru Aji <ibnuda@users.noreply.github.com> | 2021-09-01 01:23:02 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-31 11:23:02 -0700 |
commit | 6f5428687c37d45cf279d9d3f44de1098a767723 (patch) | |
tree | 4e83e846eb6a4e613683fc1409eab79b529a36ee | |
parent | bdd0a6c09789e3e4380f4351f1f83004542d309f (diff) |
[Keymap] reflects current rick's keymap (#14169)
-rw-r--r-- | keyboards/handwired/dactyl_manuform/4x5/keymaps/ibnuda/keymap.c | 43 | ||||
-rw-r--r-- | users/ibnuda/abstraction.c | 17 | ||||
-rw-r--r-- | users/ibnuda/abstraction.h | 117 | ||||
-rw-r--r-- | users/ibnuda/combo.h | 109 | ||||
-rw-r--r-- | users/ibnuda/config.h | 8 | ||||
-rw-r--r-- | users/ibnuda/ibnuda.h | 52 | ||||
-rw-r--r-- | users/ibnuda/rules.mk | 6 | ||||
-rw-r--r-- | users/ibnuda/tapdance.c | 83 | ||||
-rw-r--r-- | users/ibnuda/tapdance.h | 23 | ||||
-rw-r--r-- | users/ibnuda/wrapper.h | 38 |
10 files changed, 231 insertions, 265 deletions
diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/ibnuda/keymap.c b/keyboards/handwired/dactyl_manuform/4x5/keymaps/ibnuda/keymap.c index 58a8c63aaf..bf2c08e805 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/keymaps/ibnuda/keymap.c +++ b/keyboards/handwired/dactyl_manuform/4x5/keymaps/ibnuda/keymap.c @@ -16,46 +16,45 @@ K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \ - KTA, KTB, KTC, KTD \ + KTA, KTB, KTC, KTD, KTE, KTF \ ) \ LAYOUT_wrapper( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \ - TAB, GUI, MIN, SLS, \ - KTA, KTB, KTC, KTD, \ + TAB, KTA, KTF, SLS, \ + KTB, KTC, KTD, KTE, \ CTL, DEL, QUE, CTL, \ - ___, ___, ___, ___ \ + ___, ___, ___, ___ \ ) #define LAYOUT_dm_base_wrapper(...) LAYOUT_dm_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_dm_base_wrapper( - ________________DVORAK_L1_______________, ________________DVORAK_R1_______________, - ________________DVORAK_L2_______________, ________________DVORAK_R2_______________, - ________________DVORAK_L3_______________, ________________DVORAK_R3_______________, - LW_BSPC,SFT_ESC, ALT_ENT,RS_SPC + LUP, LUR, LUM, LUI, LUII, RUII, RUI, RUM, RUR, RUP, + SHLP, CTLR, ALLM, LMI, GULII, GURII, RMI, ALRM, CTRR, SHRP, + LLP, LLR, LLM, LLI, LLII, RLII, RLI, RLM, RLR, RLP, + CT_ESC, LW_E, SF_BSPC, AL_ENT, RS_SPC, TRAISE ), [_RAISE] = LAYOUT_dm_base_wrapper( - ________________RAISE_L1________________, ________________RAISE_R1________________, - ________________RAISE_L2________________, ________________RAISE_R2________________, - ________________RAISE_L3________________, ________________RAISE_R3________________, - ADDDD, _______, _______,_______ + KC_EXLM,KC_AT, KC_UP, KC_LCBR,KC_RCBR, KC_BSLS,KC_7, KC_8, KC_9, KC_ASTR , + KC_HASH,CT_LEFT,AL_DOWN,KC_RGHT,KC_DLR, GU_EQL, KC_4, AL_FIVE,CT_SIX, SH_ZERO , + KC_LBRC,KC_RBRC,KC_LPRN,KC_RPRN,KC_AMPR, KC_GRV, KC_1, KC_2, KC_3, KC_PLUS , + _______,ADDDD ,_______, _______,RS_SPC, _______ ), [_LOWER] = LAYOUT_dm_base_wrapper( - ________________LOWER_L1________________, ________________LOWER_R1________________, - ________________LOWER_L2________________, ________________LOWER_R2________________, - ________________LOWER_L3________________, ________________LOWER_R3________________, - _______,_______, _______,ADDDD + KC_ESC, KC_QUES,KC_UNDS,KC_F1, KC_F2, KC_F3, KC_F4, KC_MINS,KC_SLSH,KC_BSPC , + KC_LSFT,KC_PSCR,KC_PGUP,KC_F5, KC_F6, KC_F7, KC_F8, KC_HOME,KC_LALT,KC_ENT , + KC_CLCK,KC_SLCK,KC_PGDN,KC_F9, KC_F10, KC_F11, KC_F12, KC_END, KC_INS, KC_SLSH , + _______,_______,_______, _______,ADDDD, _______ ), [_ADJUST] = LAYOUT_dm_base_wrapper( - ________________ADJUST_L1_______________, ________________ADJUST_R1_______________, - ________________ADJUST_L2_______________, ________________ADJUST_R2_______________, - ________________ADJUST_L3_______________, ________________ADJUST_R3_______________, - _______,_______, _______,_______ -), -}; + _______,EXPLR, KC_UP, PRVTAB, PRVWIN, NXTWIN, NXTTAB, _______,_______,LCKGUI, + TSKMGR, KC_LEFT,KC_DOWN,KC_RGHT,UPTAB, DNTAB, KC_ENT, KC_LGUI,_______,CALDL, + _______,CLSGUI, _______,CONPST, RESET, _______,_______,_______,_______,_______, + _______,_______,_______, _______,_______,_______ +),}; // clang-format on diff --git a/users/ibnuda/abstraction.c b/users/ibnuda/abstraction.c new file mode 100644 index 0000000000..757248a260 --- /dev/null +++ b/users/ibnuda/abstraction.c @@ -0,0 +1,17 @@ +/* Copyright 2021 Ibnu D. Aji + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "abstraction.h"
\ No newline at end of file diff --git a/users/ibnuda/abstraction.h b/users/ibnuda/abstraction.h new file mode 100644 index 0000000000..0870116c9a --- /dev/null +++ b/users/ibnuda/abstraction.h @@ -0,0 +1,117 @@ +/* Copyright 2021 Ibnu D. Aji + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once +#include "quantum.h" + +enum { + _BASE, + _LOWER, + _RAISE, + _ADJUST, +}; + +// keycode abstraction +// ABC: +// A: L = left +// R = right +// B: U = upper row +// M = middle row +// L = lower row +// C: P = pinky finger +// R = ring finger +// M = middle finger +// I = index finger +// II = inner index finger +#define LUP KC_Q +#define LUR KC_V +#define LUM KC_C +#define LUI KC_P +#define LUII KC_B +#define LMP KC_R +#define LMR KC_S +#define LMM KC_T +#define LMI KC_H +#define LMII KC_D +#define LLP KC_QUOT +#define LLR KC_J +#define LLM KC_G +#define LLI KC_K +#define LLII KC_X + +#define RUP KC_Z +#define RUR KC_Y +#define RUM KC_U +#define RUI KC_L +#define RUII KC_DOT +#define RMP KC_O +#define RMR KC_I +#define RMM KC_A +#define RMI KC_N +#define RMII KC_F +#define RLP KC_SLSH +#define RLR KC_SCLN +#define RLM KC_W +#define RLI KC_M +#define RLII KC_COMM + + +// thumb keys. +#define TRAISE TG(_RAISE) +#define AL_ENT ALT_T(KC_ENT) +#define SF_BSPC SFT_T(KC_BSPC) +#define CT_ESC CTL_T(KC_ESC) + +// home row mods. +#define CTLR LCTL_T(LMR) +#define CTRR RCTL_T(RMR) +#define CT_LEFT LCTL_T(KC_LEFT) +#define CT_SIX RCTL_T(KC_6) + +#define SHLP LSFT_T(LMP) +#define SHRP RSFT_T(RMP) +#define SH_HASH LSFT_T(KC_HASH) +#define SH_ZERO RSFT_T(KC_0) + +#define ALLM LALT_T(LMM) +#define ALRM RALT_T(RMM) +#define AL_DOWN LALT_T(KC_DOWN) +#define AL_FIVE RALT_T(KC_5) + +#define GULII RGUI_T(LMII) +#define GURII LGUI_T(RMII) +#define GU_DLR RGUI_T(KC_DLR) +#define GU_EQL LGUI_T(KC_EQL) + +// layer toggle. +#define LW_E LT(_LOWER, KC_E) +#define RS_SPC LT(_RAISE, KC_SPC) + +#define ADDDD MO(_ADJUST) + +// common shortcuts for windows and linux that i use. +#define NXTTAB LCTL(KC_PGDN) +#define PRVTAB LCTL(KC_PGUP) +#define UPTAB LCTL(LSFT(KC_PGUP)) +#define DNTAB LCTL(LSFT(KC_PGDN)) +#define NXTWIN LALT(KC_TAB) +#define PRVWIN LALT(LSFT(KC_TAB)) +#define CALDL LCTL(LALT(KC_DELT)) +#define TSKMGR LCTL(LSFT(KC_ESC)) +#define EXPLR LGUI(KC_E) +#define LCKGUI LGUI(KC_L) +#define CONPST LSFT(KC_INS) +#define CLSGUI LALT(KC_F4) diff --git a/users/ibnuda/combo.h b/users/ibnuda/combo.h index a9fa69d222..5a331e7d01 100644 --- a/users/ibnuda/combo.h +++ b/users/ibnuda/combo.h @@ -1,61 +1,96 @@ #pragma once #include "quantum.h" +#include "abstraction.h" + // enum for combos. enum combos { // left hand combinations. - COLON_COMMA, - COMMA_DOT, - DOT_P, - QUOT_Q, - Q_J, - J_K, + R_U_PINKY_RING, + R_U_RING_MIDDLE, + R_U_RING_INDEX, + R_U_MIDDLE_INDEX, + R_U_MIDDLE_INNER_INDEX, + R_U_INDEX_INNER_INDEX, + R_L_PINKY_RING, + R_L_RING_MIDDLE, + R_L_RING_INDEX, + R_L_MIDDLE_INDEX, + R_L_INDEX_INNER_INDEX, // right hand combinations. - L_R, - R_C, - C_G, - V_W, - W_M, + L_U_PINKY_RING, + L_U_RING_MIDDLE, + L_U_RING_INDEX, + L_U_MIDDLE_INDEX, + L_U_MIDDLE_INNER_INDEX, + L_U_INNER_INNER_INDEX, + L_L_PINKY_RING, + L_L_RING_MIDDLE, + L_L_MIDDLE_INDEX, + L_L_RING_INDEX, + L_L_INDEX_INNER_INDEX, // both hands combinations. - J_W, + B_L_MIDDLE_MIDDLE, }; // left hand combinations. -const uint16_t PROGMEM colon_comma_combo[] = {KC_SCLN, KC_COMM, COMBO_END}; -const uint16_t PROGMEM comma_dot_combo[] = {KC_COMM, KC_DOT, COMBO_END}; -const uint16_t PROGMEM dot_p_combo[] = {KC_DOT, KC_P, COMBO_END}; -const uint16_t PROGMEM quot_q_combo[] = {KC_QUOT, KC_Q, COMBO_END}; -const uint16_t PROGMEM q_j_combo[] = {KC_Q, KC_J, COMBO_END}; -const uint16_t PROGMEM j_k_combo[] = {KC_J, KC_K, COMBO_END}; +const uint16_t PROGMEM lu_p_r_combo[] = {LUP, LUR, COMBO_END}; +const uint16_t PROGMEM lu_r_m_combo[] = {LUR, LUM, COMBO_END}; +const uint16_t PROGMEM lu_r_i_combo[] = {LUR, LUI, COMBO_END}; +const uint16_t PROGMEM lu_m_i_combo[] = {LUM, LUI, COMBO_END}; +const uint16_t PROGMEM lu_m_ii_combo[] = {LUM, LUII, COMBO_END}; +const uint16_t PROGMEM lu_i_ii_combo[] = {LUI, LUII, COMBO_END}; +const uint16_t PROGMEM ll_p_r_combo[] = {LLP, LLR, COMBO_END}; +const uint16_t PROGMEM ll_r_m_combo[] = {LLR, LLM, COMBO_END}; +const uint16_t PROGMEM ll_r_i_combo[] = {LLR, LLI, COMBO_END}; +const uint16_t PROGMEM ll_m_i_combo[] = {LLM, LLI, COMBO_END}; +const uint16_t PROGMEM ll_i_ii_combo[] = {LLI, LLII, COMBO_END}; // right hand combinations. -const uint16_t PROGMEM l_r_combo[] = {KC_L, KC_R, COMBO_END}; -const uint16_t PROGMEM r_c_combo[] = {KC_R, KC_C, COMBO_END}; -const uint16_t PROGMEM c_g_combo[] = {KC_C, KC_G, COMBO_END}; -const uint16_t PROGMEM v_w_combo[] = {KC_V, KC_W, COMBO_END}; -const uint16_t PROGMEM w_m_combo[] = {KC_W, KC_M, COMBO_END}; +const uint16_t PROGMEM ru_p_r_combo[] = {RUP, RUR, COMBO_END}; +const uint16_t PROGMEM ru_r_m_combo[] = {RUR, RUM, COMBO_END}; +const uint16_t PROGMEM ru_r_i_combo[] = {RUR, RUI, COMBO_END}; +const uint16_t PROGMEM ru_m_i_combo[] = {RUM, RUI, COMBO_END}; +const uint16_t PROGMEM ru_m_ii_combo[] = {RUM, RUII, COMBO_END}; +const uint16_t PROGMEM ru_i_ii_combo[] = {RUI, RUII, COMBO_END}; +const uint16_t PROGMEM rl_p_r_combo[] = {RLP, RLR, COMBO_END}; +const uint16_t PROGMEM rl_r_m_combo[] = {RLR, RLM, COMBO_END}; +const uint16_t PROGMEM rl_r_i_combo[] = {RLR, RLI, COMBO_END}; +const uint16_t PROGMEM rl_m_i_combo[] = {RLM, RLI, COMBO_END}; +const uint16_t PROGMEM rl_i_ii_combo[] = {RLI, RLII, COMBO_END}; // both hand combinations. -const uint16_t PROGMEM j_w_combo[] = {KC_J, KC_W, COMBO_END}; +const uint16_t PROGMEM bl_m_m_combo[] = {LLM, RLM, COMBO_END}; combo_t key_combos[COMBO_COUNT] = { // left hand combinations. - [COLON_COMMA] = COMBO(colon_comma_combo, KC_TAB), - [COMMA_DOT] = COMBO(comma_dot_combo, KC_QUES), - [DOT_P] = COMBO(dot_p_combo, KC_UNDS), - [QUOT_Q] = COMBO(quot_q_combo, KC_ENT), - [Q_J] = COMBO(q_j_combo, LCTL(KC_W)), - [J_K] = COMBO(j_k_combo, KC_DELT), + [R_U_PINKY_RING] = COMBO(lu_p_r_combo, KC_TAB), + [R_U_RING_MIDDLE] = COMBO(lu_r_m_combo, KC_QUES), + [R_U_RING_INDEX] = COMBO(lu_r_i_combo, PRVTAB), + [R_U_MIDDLE_INDEX] = COMBO(lu_m_i_combo, KC_UNDS), + [R_U_MIDDLE_INNER_INDEX] = COMBO(lu_m_ii_combo, KC_ENT), + [R_U_INDEX_INNER_INDEX] = COMBO(lu_i_ii_combo, KC_PIPE), + [R_L_PINKY_RING] = COMBO(ll_p_r_combo, KC_ENT), + [R_L_RING_MIDDLE] = COMBO(ll_r_m_combo, LCTL(KC_W)), + [R_L_RING_INDEX] = COMBO(ll_r_i_combo, KC_TAB), + [R_L_MIDDLE_INDEX] = COMBO(ll_m_i_combo, KC_DELT), + [R_L_INDEX_INNER_INDEX] = COMBO(ll_i_ii_combo, KC_TILD), // right hand combinations. - [L_R] = COMBO(l_r_combo, KC_BSPC), - [R_C] = COMBO(r_c_combo, KC_SLSH), - [C_G] = COMBO(c_g_combo, KC_MINS), - [V_W] = COMBO(v_w_combo, KC_APP), - [W_M] = COMBO(w_m_combo, KC_DELT), + [L_U_PINKY_RING] = COMBO(ru_p_r_combo, KC_BSPC), + [L_U_RING_MIDDLE] = COMBO(ru_r_m_combo, KC_SLSH), + [L_U_RING_INDEX] = COMBO(ru_r_i_combo, NXTTAB), + [L_U_MIDDLE_INDEX] = COMBO(ru_m_i_combo, KC_MINS), + [L_U_MIDDLE_INNER_INDEX] = COMBO(ru_m_ii_combo, KC_ENT), + [L_U_INNER_INNER_INDEX] = COMBO(ru_i_ii_combo, KC_BSLS), + [L_L_PINKY_RING] = COMBO(rl_p_r_combo, KC_BSLS), + [L_L_RING_MIDDLE] = COMBO(rl_r_m_combo, KC_APP), + [L_L_RING_INDEX] = COMBO(rl_r_i_combo, LSFT(KC_TAB)), + [L_L_MIDDLE_INDEX] = COMBO(rl_m_i_combo, KC_DELT), + [L_L_INDEX_INNER_INDEX] = COMBO(rl_i_ii_combo, KC_GRV), // both hand combinations. - [J_W] = COMBO(j_w_combo, KC_ENT), -}; + [B_L_MIDDLE_MIDDLE] = COMBO(bl_m_m_combo, KC_ENT), +};
\ No newline at end of file diff --git a/users/ibnuda/config.h b/users/ibnuda/config.h index b43679a66e..f9a89389b6 100644 --- a/users/ibnuda/config.h +++ b/users/ibnuda/config.h @@ -1,9 +1,7 @@ #pragma once -#define COMBO_COUNT 18 -#define COMBO_TERM 100 +#define COMBO_TERM 50 +#define COMBO_COUNT 50 #define IGNORE_MOD_TAP_INTERRUPT -#define PERMISSIVE_HOLD - -#define TAPPING_TERM 200 +#define PERMISSIVE_HOLD
\ No newline at end of file diff --git a/users/ibnuda/ibnuda.h b/users/ibnuda/ibnuda.h index f50949df56..6047b546ff 100644 --- a/users/ibnuda/ibnuda.h +++ b/users/ibnuda/ibnuda.h @@ -1,55 +1,5 @@ #pragma once #include "quantum.h" -#include "tapdance.h" +#include "abstraction.h" #include "wrapper.h" -//#include "combo.h" - -enum { - _BASE, - _LOWER, - _RAISE, - _ADJUST, -}; - -// thumb keys. -#define ALT_ENT ALT_T(KC_ENT) -#define SFT_ESC SFT_T(KC_ESC) - -// home row mods. -#define CT_O LCTL_T(KC_O) -#define CT_N RCTL_T(KC_N) -#define SH_A LSFT_T(KC_A) -#define SH_S RSFT_T(KC_S) -#define AL_E LALT_T(KC_E) -#define AL_T RALT_T(KC_T) -#define GU_I LGUI_T(KC_I) -#define GU_D RGUI_T(KC_D) - -// layer toggle. -#define LW_I LT(_LOWER, KC_I) -#define LW_BSPC LT(_LOWER, KC_BSPC) -#define RS_SPC LT(_RAISE, KC_SPC) -#define RS_D LT(_RAISE, KC_D) - -// idk, man. not used, i guess. -#define ADDDD MO(_ADJUST) - -// common shortcuts for windows and linux that i use. -#define NXTTAB LCTL(KC_PGDN) -#define PRVTAB LCTL(KC_PGUP) -#define UPTAB LCTL(LSFT(KC_PGUP)) -#define DNTAB LCTL(LSFT(KC_PGDN)) -#define NXTWIN LALT(KC_TAB) -#define PRVWIN LALT(LSFT(KC_TAB)) -#define CALDL LCTL(LALT(KC_DELT)) -#define TSKMGR LCTL(LSFT(KC_ESC)) -#define EXPLR LGUI(KC_E) -#define LCKGUI LGUI(KC_L) -#define CONPST LSFT(KC_INS) -#define CLSGUI LALT(KC_F4) - -// tap dances -#define CTL_DLT TD(TD_DLT_CTLDLT) -#define SM_CLN TD(TD_SCLN_CLN) -#define LFT_TMB TD(TD_LEFT_THUMB) diff --git a/users/ibnuda/rules.mk b/users/ibnuda/rules.mk index 1cf315ebe9..c4b096c4a0 100644 --- a/users/ibnuda/rules.mk +++ b/users/ibnuda/rules.mk @@ -1,14 +1,8 @@ COMBO_ENABLE = yes -COMMAND_ENABLE = yes CONSOLE_ENABLE = yes -TAP_DANCE_ENABLE = yes SRC += ibnuda.c -ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) - SRC += tapdance.c -endif - ifeq ($(strip $(COMBO_ENABLE)), yes) SRC += combo.c endif diff --git a/users/ibnuda/tapdance.c b/users/ibnuda/tapdance.c deleted file mode 100644 index c0d2192587..0000000000 --- a/users/ibnuda/tapdance.c +++ /dev/null @@ -1,83 +0,0 @@ -#include "tapdance.h" - -static td_state_t td_state; - -void dance_dlt_finished(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - register_code16(KC_DELT); - } else { - register_code16(C(KC_DELT)); - } -} - -void dance_dlt_reset(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - unregister_code16(KC_DELT); - } else { - unregister_code16(C(KC_DELT)); - } -} - -void dance_cln_finished(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - register_code(KC_LSFT); - } - register_code(KC_SCLN); -} - -void dance_cln_reset(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - unregister_code(KC_LSFT); - } - unregister_code(KC_SCLN); -} - -int current_dance(qk_tap_dance_state_t *state) { - if (state->count == 1) { - if (state->interrupted || !state->pressed) { - return SINGLE_TAP; - } else { - return SINGLE_HOLD; - } - } - if (state->count == 2) { - return DOUBLE_TAP; - } else { - return 3; - } -} - -void dance_tmb_finished(qk_tap_dance_state_t *state, void *user_data) { - td_state = current_dance(state); - switch (td_state) { - case SINGLE_TAP: - register_code16(KC_ESC); - break; - case SINGLE_HOLD: - register_mods(MOD_BIT(KC_LSFT)); - break; - case DOUBLE_TAP: - register_code16(KC_DELT); - break; - } -} - -void dance_tmb_reset(qk_tap_dance_state_t *state, void *user_data) { - switch (td_state) { - case SINGLE_TAP: - unregister_code16(KC_ESC); - break; - case SINGLE_HOLD: - unregister_mods(MOD_BIT(KC_LSFT)); - break; - case DOUBLE_TAP: - unregister_code16(KC_DELT); - break; - } -} - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_DLT_CTLDLT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_dlt_finished, dance_dlt_reset), - [TD_SCLN_CLN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_cln_finished, dance_cln_reset), - [TD_LEFT_THUMB] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_tmb_finished, dance_tmb_reset), -}; diff --git a/users/ibnuda/tapdance.h b/users/ibnuda/tapdance.h deleted file mode 100644 index 258321d4ca..0000000000 --- a/users/ibnuda/tapdance.h +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once -#include "ibnuda.h" - -#ifdef TAP_DANCE_ENABLE -typedef enum { - SINGLE_TAP, - SINGLE_HOLD, - DOUBLE_TAP, -} td_state_t; - -int current_dance(qk_tap_dance_state_t *state); - -void dance_tmb_finished(qk_tap_dance_state_t *state, void *user_data); -void dance_tmb_reset(qk_tap_dance_state_t *state, void *user_data); - -// enum for tap dances. -enum { - TD_DLT_CTLDLT = 0, - TD_SCLN_CLN, - TD_LEFT_THUMB, -}; - -#endif // TAP_DANCE_ENABLE diff --git a/users/ibnuda/wrapper.h b/users/ibnuda/wrapper.h index 34350cf369..c85be9d6b1 100644 --- a/users/ibnuda/wrapper.h +++ b/users/ibnuda/wrapper.h @@ -1,46 +1,8 @@ #pragma once -#include "ibnuda.h" -/* -Since our quirky block definitions are basically a list of comma separated -arguments, we need a wrapper in order for these definitions to be -expanded before being used as arguments to the LAYOUT_xxx macro. -*/ #if (!defined(LAYOUT) && defined(KEYMAP)) # define LAYOUT KEYMAP #endif #define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__) #define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) - -#define ________________DVORAK_L1_______________ KC_SCLN,KC_COMM,KC_DOT, KC_P, KC_Y -#define ________________DVORAK_L2_______________ SH_A, CT_O, AL_E, KC_U, GU_I -#define ________________DVORAK_L3_______________ KC_QUOT,KC_Q, KC_J, KC_K, KC_X - -#define ________________DVORAK_R1_______________ KC_F, KC_G, KC_C, KC_R, KC_L -#define ________________DVORAK_R2_______________ GU_D, KC_H, AL_T, CT_N, SH_S -#define ________________DVORAK_R3_______________ KC_B, KC_M, KC_W, KC_V, KC_Z - -#define ________________RAISE_L1________________ KC_EXLM,KC_AT, KC_UP, KC_LCBR,KC_RCBR -#define ________________RAISE_L2________________ KC_HASH,KC_LEFT,KC_DOWN,KC_RGHT,KC_DLR -#define ________________RAISE_L3________________ KC_LBRC,KC_RBRC,KC_LPRN,KC_RPRN,KC_AMPR - -#define ________________RAISE_R1________________ KC_BSLS,KC_7, KC_8, KC_9, KC_ASTR -#define ________________RAISE_R2________________ KC_EQL, KC_4, KC_5, KC_6, KC_0 -#define ________________RAISE_R3________________ KC_GRV, KC_1, KC_2, KC_3, KC_PLUS - -#define ________________LOWER_L1________________ KC_ESC, KC_QUES,KC_UNDS,KC_F1, KC_F2 -#define ________________LOWER_L2________________ KC_LSFT,KC_TAB, KC_PGUP,KC_F5, KC_F6 -#define ________________LOWER_L3________________ KC_CLCK,KC_SLCK,KC_PGDN,KC_F9, KC_F10 - -#define ________________LOWER_R1________________ KC_F3, KC_F4, KC_MINS,KC_SLSH,KC_BSPC -#define ________________LOWER_R2________________ KC_F7, KC_F8, KC_HOME,KC_LALT,KC_ENT -#define ________________LOWER_R3________________ KC_F11, KC_F12, KC_END, KC_INS, KC_SLSH - -#define ________________ADJUST_L1_______________ _______,EXPLR, KC_UP, PRVTAB, PRVWIN -#define ________________ADJUST_L2_______________ TSKMGR, KC_LEFT,KC_DOWN,KC_RGHT,UPTAB -#define ________________ADJUST_L3_______________ _______,CLSGUI, _______,CONPST, RESET - -#define ________________ADJUST_R1_______________ NXTWIN, NXTTAB, _______,_______,LCKGUI -#define ________________ADJUST_R2_______________ DNTAB, KC_ENT, KC_LGUI,_______,CALDL -#define ________________ADJUST_R3_______________ _______,_______,_______,_______,_______ |