diff options
Diffstat (limited to 'users')
| -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 000000000..68dd8b482 --- /dev/null +++ b/users/hvp/config.h | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | /* Copyright 2021 hvp | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #pragma once | ||
| 17 | |||
| 18 | #define LONG_TAPPING_TERM 1000 \ No newline at end of file | ||
diff --git a/users/hvp/hvp.h b/users/hvp/hvp.h index b016da9e2..275838a49 100644 --- a/users/hvp/hvp.h +++ b/users/hvp/hvp.h | |||
| @@ -1,13 +1,43 @@ | |||
| 1 | /* Copyright 2021 hvp | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | |||
| 1 | #pragma once | 18 | #pragma once |
| 19 | #include "quantum.h" | ||
| 20 | #undef TAPPING_TERM | ||
| 21 | #define TAPPING_TERM 150 | ||
| 2 | 22 | ||
| 3 | #ifdef TAP_DANCE_ENABLE | 23 | #ifdef TAP_DANCE_ENABLE |
| 4 | # include "tap_dances.h" | 24 | # include "tap_dances.h" |
| 5 | #endif | 25 | #endif |
| 6 | #include "quantum.h" | ||
| 7 | 26 | ||
| 8 | #undef TAPPING_TERM | 27 | #ifdef TAPPING_TERM_PER_KEY |
| 9 | #define TAPPING_TERM 150 | 28 | # include "per_key.h" |
| 29 | #endif | ||
| 10 | 30 | ||
| 11 | // Keys | ||
| 12 | 31 | ||
| 13 | #define D_NAVI MT(MOD_LCTL | MOD_LSFT, KC_D) | 32 | #define D_NAVI MT(MOD_LCTL | MOD_LSFT, KC_D) |
| 33 | |||
| 34 | /* Home-row mods */ | ||
| 35 | #define LG_A MT(MOD_LGUI, KC_A) | ||
| 36 | #define LA_S MT(MOD_LALT, KC_S) | ||
| 37 | #define LS_D MT(MOD_LSFT, KC_D) | ||
| 38 | #define LC_F MT(MOD_LCTL, KC_F) | ||
| 39 | |||
| 40 | #define RC_H MT(MOD_RCTL, KC_H) | ||
| 41 | #define RS_J MT(MOD_RSFT, KC_J) | ||
| 42 | #define RA_K MT(MOD_RALT, KC_K) | ||
| 43 | #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 000000000..571fdcc91 --- /dev/null +++ b/users/hvp/per_key.c | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | /* Copyright 2021 hvp | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | |||
| 18 | // #include per_key.h | ||
| 19 | |||
| 20 | uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { | ||
| 21 | switch (keycode) { | ||
| 22 | case MT(MOD_LGUI, KC_A): | ||
| 23 | return TAPPING_TERM + LONG_TAPPING_TERM; | ||
| 24 | case MT(MOD_LALT, KC_S): | ||
| 25 | return TAPPING_TERM + LONG_TAPPING_TERM; | ||
| 26 | case MT(MOD_LSFT, KC_D): | ||
| 27 | return TAPPING_TERM + LONG_TAPPING_TERM; | ||
| 28 | case MT(MOD_LCTL, KC_F): | ||
| 29 | return TAPPING_TERM + LONG_TAPPING_TERM; | ||
| 30 | case MT(MOD_RCTL, KC_H): | ||
| 31 | return TAPPING_TERM + LONG_TAPPING_TERM; | ||
| 32 | case MT(MOD_RSFT, KC_J): | ||
| 33 | return TAPPING_TERM + LONG_TAPPING_TERM; | ||
| 34 | case MT(MOD_RALT, KC_K): | ||
| 35 | return TAPPING_TERM + LONG_TAPPING_TERM; | ||
| 36 | case MT(MOD_RGUI, KC_L): | ||
| 37 | return TAPPING_TERM + LONG_TAPPING_TERM; | ||
| 38 | case KC_LCPO: | ||
| 39 | return TAPPING_TERM 75; | ||
| 40 | default: | ||
| 41 | return TAPPING_TERM; | ||
| 42 | } | ||
| 43 | } \ No newline at end of file | ||
diff --git a/users/hvp/rules.mk b/users/hvp/rules.mk index 0a7e67963..549483b67 100644 --- a/users/hvp/rules.mk +++ b/users/hvp/rules.mk | |||
| @@ -1,4 +1,9 @@ | |||
| 1 | |||
| 1 | SRC += hvp.c | 2 | SRC += hvp.c |
| 2 | ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) | 3 | ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) |
| 3 | SRC += tap_dances.c | 4 | SRC += tap_dances.c |
| 5 | endif | ||
| 6 | |||
| 7 | ifeq ($(strip $(TAPPING_TERM_PER_KEY)), yes) | ||
| 8 | SRC += per_key.c | ||
| 4 | endif \ No newline at end of file | 9 | endif \ No newline at end of file |
diff --git a/users/hvp/tap_dances.h b/users/hvp/tap_dances.h index cad9bd90e..a00caf092 100644 --- a/users/hvp/tap_dances.h +++ b/users/hvp/tap_dances.h | |||
| @@ -1,5 +1,22 @@ | |||
| 1 | /* Copyright 2021 hvp | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | |||
| 1 | #pragma once | 18 | #pragma once |
| 2 | #include "hvp.h" | 19 | #include "quantum.h" |
| 3 | 20 | ||
| 4 | // Tap Dance Declarations | 21 | // Tap Dance Declarations |
| 5 | enum tapdance_id | 22 | enum tapdance_id |
| @@ -9,4 +26,4 @@ enum tapdance_id | |||
| 9 | TD3, | 26 | TD3, |
| 10 | TD4, | 27 | TD4, |
| 11 | TD5 | 28 | TD5 |
| 12 | }; | 29 | }; \ No newline at end of file |
