diff options
author | QMK Bot <hello@qmk.fm> | 2021-09-02 03:44:58 +0000 |
---|---|---|
committer | QMK Bot <hello@qmk.fm> | 2021-09-02 03:44:58 +0000 |
commit | f77602b8fb62396605861330290011c318356933 (patch) | |
tree | 1cd70ba97b01daa38be59583c93fbc99fec5906d /users/hvp | |
parent | 7847acdded30de74140cf398ea74203180c7e49f (diff) | |
parent | cb53c4fd41885ba60192cbd0b5fd23d6a687ab17 (diff) |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'users/hvp')
-rw-r--r-- | users/hvp/config.h | 18 | ||||
-rw-r--r-- | users/hvp/hvp.h | 38 | ||||
-rw-r--r-- | users/hvp/per_key.c | 43 | ||||
-rw-r--r-- | users/hvp/rules.mk | 7 | ||||
-rw-r--r-- | users/hvp/tap_dances.h | 21 |
5 files changed, 120 insertions, 7 deletions
diff --git a/users/hvp/config.h b/users/hvp/config.h new file mode 100644 index 0000000000..68dd8b4828 --- /dev/null +++ b/users/hvp/config.h @@ -0,0 +1,18 @@ + /* Copyright 2021 hvp + * + * 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 + +#define LONG_TAPPING_TERM 1000
\ No newline at end of file diff --git a/users/hvp/hvp.h b/users/hvp/hvp.h index b016da9e25..275838a49a 100644 --- a/users/hvp/hvp.h +++ b/users/hvp/hvp.h @@ -1,13 +1,43 @@ + /* Copyright 2021 hvp + * + * 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" +#undef TAPPING_TERM +#define TAPPING_TERM 150 #ifdef TAP_DANCE_ENABLE # include "tap_dances.h" #endif -#include "quantum.h" -#undef TAPPING_TERM -#define TAPPING_TERM 150 +#ifdef TAPPING_TERM_PER_KEY +# include "per_key.h" +#endif -// Keys #define D_NAVI MT(MOD_LCTL | MOD_LSFT, KC_D) + +/* Home-row mods */ +#define LG_A MT(MOD_LGUI, KC_A) +#define LA_S MT(MOD_LALT, KC_S) +#define LS_D MT(MOD_LSFT, KC_D) +#define LC_F MT(MOD_LCTL, KC_F) + +#define RC_H MT(MOD_RCTL, KC_H) +#define RS_J MT(MOD_RSFT, KC_J) +#define RA_K MT(MOD_RALT, KC_K) +#define RG_L MT(MOD_RGUI, KC_L)
\ No newline at end of file diff --git a/users/hvp/per_key.c b/users/hvp/per_key.c new file mode 100644 index 0000000000..571fdcc915 --- /dev/null +++ b/users/hvp/per_key.c @@ -0,0 +1,43 @@ + /* Copyright 2021 hvp + * + * 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 per_key.h + +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case MT(MOD_LGUI, KC_A): + return TAPPING_TERM + LONG_TAPPING_TERM; + case MT(MOD_LALT, KC_S): + return TAPPING_TERM + LONG_TAPPING_TERM; + case MT(MOD_LSFT, KC_D): + return TAPPING_TERM + LONG_TAPPING_TERM; + case MT(MOD_LCTL, KC_F): + return TAPPING_TERM + LONG_TAPPING_TERM; + case MT(MOD_RCTL, KC_H): + return TAPPING_TERM + LONG_TAPPING_TERM; + case MT(MOD_RSFT, KC_J): + return TAPPING_TERM + LONG_TAPPING_TERM; + case MT(MOD_RALT, KC_K): + return TAPPING_TERM + LONG_TAPPING_TERM; + case MT(MOD_RGUI, KC_L): + return TAPPING_TERM + LONG_TAPPING_TERM; + case KC_LCPO: + return TAPPING_TERM 75; + default: + return TAPPING_TERM; + } +}
\ No newline at end of file diff --git a/users/hvp/rules.mk b/users/hvp/rules.mk index 0a7e679631..549483b67b 100644 --- a/users/hvp/rules.mk +++ b/users/hvp/rules.mk @@ -1,4 +1,9 @@ + SRC += hvp.c ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) - SRC += tap_dances.c + SRC += tap_dances.c +endif + +ifeq ($(strip $(TAPPING_TERM_PER_KEY)), yes) + SRC += per_key.c endif
\ No newline at end of file diff --git a/users/hvp/tap_dances.h b/users/hvp/tap_dances.h index cad9bd90ec..a00caf0929 100644 --- a/users/hvp/tap_dances.h +++ b/users/hvp/tap_dances.h @@ -1,5 +1,22 @@ + /* Copyright 2021 hvp + * + * 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 "hvp.h" +#include "quantum.h" // Tap Dance Declarations enum tapdance_id @@ -9,4 +26,4 @@ enum tapdance_id TD3, TD4, TD5 -}; +};
\ No newline at end of file |