diff options
34 files changed, 880 insertions, 323 deletions
diff --git a/keyboards/atreus/keymaps/talljoe-atreus/config.h b/keyboards/atreus/keymaps/talljoe-atreus/config.h deleted file mode 100644 index 87b68ffc6..000000000 --- a/keyboards/atreus/keymaps/talljoe-atreus/config.h +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | #ifndef CONFIG_USER_H | ||
2 | #define CONFIG_USER_H | ||
3 | |||
4 | #include QMK_KEYBOARD_CONFIG_H | ||
5 | |||
6 | #define PREVENT_STUCK_MODIFIERS | ||
7 | #define SPACE_COUNT 2 | ||
8 | |||
9 | #define TEMPLATE( \ | ||
10 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ | ||
11 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ | ||
12 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ | ||
13 | K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ | ||
14 | K40, K41, K42, K44, K45, K46, K48, K49, K4B, K4C \ | ||
15 | ) LAYOUT( \ | ||
16 | K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ | ||
17 | K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \ | ||
18 | K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, \ | ||
19 | K10, K41, K42, K30, K44, K1D, K20, K45, K3C, K0D, K2B, K3D \ | ||
20 | ) | ||
21 | |||
22 | #define TEMPLATE_NUM( \ | ||
23 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ | ||
24 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ | ||
25 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ | ||
26 | K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ | ||
27 | K40, K41, K42, K44, K45, K46, K48, K49, K4B, K4C \ | ||
28 | ) LAYOUT( \ | ||
29 | K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ | ||
30 | K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \ | ||
31 | K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, \ | ||
32 | K10, K41, K42, K30, K44, K1D, K20, K45, K48, K49, K2B, K3D \ | ||
33 | ) | ||
34 | |||
35 | |||
36 | #define TEMPLATE_RESET LAYOUT( \ | ||
37 | RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ | ||
38 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ | ||
39 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ | ||
40 | RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ | ||
41 | ) | ||
42 | #endif | ||
diff --git a/keyboards/atreus/keymaps/talljoe/config.h b/keyboards/atreus/keymaps/talljoe/config.h new file mode 100644 index 000000000..64d5b5894 --- /dev/null +++ b/keyboards/atreus/keymaps/talljoe/config.h | |||
@@ -0,0 +1,53 @@ | |||
1 | /* Copyright 2020 Joseph Wasson | ||
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 | #pragma once | ||
18 | |||
19 | #define SPACE_COUNT 3 | ||
20 | |||
21 | #define TEMPLATE_TKL( \ | ||
22 | KESC, KF01, KF02, KF03, KF04, KF05, KF06, KF07, KF08, KF09, KF10, KF11, KF12, KSCL, KPRS, KADJ, \ | ||
23 | KGRV, K_1 , K_2 , K_3 , K_4 , K_5 , K_6 , K_7 , K_8 , K_9 , K_0 , KMIN, KEQL, KBSP, KINS, KHOM, KPUP, \ | ||
24 | KTAB, K_Q , K_W , K_E , K_R , K_T , K_Y , K_U , K_I , K_O , K_P , KLBR, KRBR, KBLS, KDEL, KEND, LPDN, \ | ||
25 | KCAP, K_A , K_S , K_D , K_F , K_G , K_H , K_J , K_K , K_L , KSMI, KQUO, KENT, \ | ||
26 | KLSH, K_Z , K_X , K_C , K_V , K_B , K_N , K_M , KCMA, KDOT, KSLS, KRSH, K_UP, \ | ||
27 | KLCT, KLOS, KLAL, KSP3, KSP2, KSP1, KRAL, KROS, KRCT, KPTT, K_LT, K_DN, K_RT \ | ||
28 | ) LAYOUT( \ | ||
29 | K_Q , K_W , K_E , K_R , K_T , K_Y , K_U , K_I , K_O , K_P , \ | ||
30 | K_A , K_S , K_D , K_F , K_G , K_H , K_J , K_K , K_L , KSMI, \ | ||
31 | K_Z , K_X , K_C , K_V , K_B , K_N , K_M , KCMA, KDOT, KSLS, \ | ||
32 | KTAB, KLOS, KLAL, KLSH, KSP3, KSP2, KCAP, KSP1, KRSH, KBLS, KQUO, KADJ \ | ||
33 | ) | ||
34 | |||
35 | #define TEMPLATE_NUM( \ | ||
36 | KGRV, K_1 , K_2 , K_3 , K_4 , K_5 , K_6 , K_7 , K_8 , K_9 , K_0 , KMIN, KEQL, KBSL, KESC, \ | ||
37 | KTAB, K_Q , K_W , K_E , K_R , K_T , K_Y , K_U , K_I , K_O , K_P , KLBR, KRBR, KBSP, \ | ||
38 | KCAP, K_A , K_S , K_D , K_F , K_G , K_H , K_J , K_K , K_L , KSMI, KQUO, KENT, \ | ||
39 | KLSH, K_Z , K_X , K_C , K_V , K_B , K_N , K_M , KCMA, KDOT, KSLS, KRSH, KADJ, \ | ||
40 | KLCT, KLOS, KLAL, KSP3, KSP2, KSP1, KRAL, KROS, KRCT, KPTT \ | ||
41 | ) LAYOUT( \ | ||
42 | K_Q , K_W , K_E , K_R , K_T , K_Y , K_U , K_I , K_O , K_P , \ | ||
43 | K_A , K_S , K_D , K_F , K_G , K_H , K_J , K_K , K_L , KSMI, \ | ||
44 | K_Z , K_X , K_C , K_V , K_B , K_N , K_M , KCMA, KDOT, KSLS, \ | ||
45 | KTAB, KLOS, KLAL, KLSH, KSP3, KSP2, KCAP, KSP1, KRAL, KROS, KQUO, KADJ \ | ||
46 | ) | ||
47 | |||
48 | #define TEMPLATE_RESET LAYOUT( \ | ||
49 | RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ | ||
50 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ | ||
51 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ | ||
52 | RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ | ||
53 | ) | ||
diff --git a/keyboards/atreus/keymaps/talljoe-atreus/keymap.c b/keyboards/atreus/keymaps/talljoe/keymap.c index 7812add81..7812add81 100644 --- a/keyboards/atreus/keymaps/talljoe-atreus/keymap.c +++ b/keyboards/atreus/keymaps/talljoe/keymap.c | |||
diff --git a/keyboards/atreus/keymaps/talljoe-atreus/rules.mk b/keyboards/atreus/keymaps/talljoe/rules.mk index 92007fe8a..92007fe8a 100644 --- a/keyboards/atreus/keymaps/talljoe-atreus/rules.mk +++ b/keyboards/atreus/keymaps/talljoe/rules.mk | |||
diff --git a/keyboards/jd45/keymaps/talljoe/config.h b/keyboards/jd45/keymaps/talljoe/config.h index f8b0333cf..8b06cefd5 100644 --- a/keyboards/jd45/keymaps/talljoe/config.h +++ b/keyboards/jd45/keymaps/talljoe/config.h | |||
@@ -1,7 +1,19 @@ | |||
1 | #ifndef CONFIG_USER_H | 1 | /* Copyright 2020 Joseph Wasson |
2 | #define CONFIG_USER_H | 2 | * |
3 | 3 | * This program is free software: you can redistribute it and/or modify | |
4 | #include QMK_KEYBOARD_CONFIG_H | 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 | ||
5 | 17 | ||
6 | #define PREVENT_STUCK_MODIFIERS | 18 | #define PREVENT_STUCK_MODIFIERS |
7 | #define SPACE_COUNT 2 | 19 | #define SPACE_COUNT 2 |
@@ -14,9 +26,7 @@ | |||
14 | K40, K41, K42, K44, K45, K46, K48, K49, K4B, K4C \ | 26 | K40, K41, K42, K44, K45, K46, K48, K49, K4B, K4C \ |
15 | ) { \ | 27 | ) { \ |
16 | { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K0D, K1D }, \ | 28 | { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K0D, K1D }, \ |
17 | { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2C, KC_NO }, \ | 29 | { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO }, \ |
18 | { K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \ | 30 | { K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \ |
19 | { K40, K00, K41, K42, K44, KC_NO, K45, KC_NO, K48, K49, K3D, K4C, KC_NO } \ | 31 | { K40, K00, K41, K42, K44, KC_NO, K46, KC_NO, K48, K49, K3D, K4C, KC_NO } \ |
20 | } | 32 | } |
21 | |||
22 | #endif | ||
diff --git a/keyboards/primekb/prime_e/keymaps/talljoe/config.h b/keyboards/primekb/prime_e/keymaps/talljoe/config.h new file mode 100644 index 000000000..7ecea9c15 --- /dev/null +++ b/keyboards/primekb/prime_e/keymaps/talljoe/config.h | |||
@@ -0,0 +1,33 @@ | |||
1 | /* Copyright 2020 Joseph Wasson | ||
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 | #pragma once | ||
18 | |||
19 | #define SPACE_COUNT 2 | ||
20 | |||
21 | #define TEMPLATE( \ | ||
22 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ | ||
23 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ | ||
24 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ | ||
25 | K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ | ||
26 | K40, K41, K42, K44, K45, K46, K48, K49, K4B, K4C \ | ||
27 | ) \ | ||
28 | LAYOUT( \ | ||
29 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1D, K2D, \ | ||
30 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2C, \ | ||
31 | K30, K32, K33, K34, K35, K36, K2B, K37, K38, K39, K3A, K3B, K3C, \ | ||
32 | K40, K41, K42, K44, K46, K48, K49, K3D \ | ||
33 | ) | ||
diff --git a/keyboards/primekb/prime_e/keymaps/talljoe/keymap.c b/keyboards/primekb/prime_e/keymaps/talljoe/keymap.c new file mode 100644 index 000000000..7812add81 --- /dev/null +++ b/keyboards/primekb/prime_e/keymaps/talljoe/keymap.c | |||
@@ -0,0 +1 @@ | |||
// This space intentionally left blank | |||
diff --git a/keyboards/thevankeyboards/bananasplit/keymaps/talljoe/config.h b/keyboards/thevankeyboards/bananasplit/keymaps/talljoe/config.h index fc9bd3d61..40b3fd3ec 100644 --- a/keyboards/thevankeyboards/bananasplit/keymaps/talljoe/config.h +++ b/keyboards/thevankeyboards/bananasplit/keymaps/talljoe/config.h | |||
@@ -1,7 +1,20 @@ | |||
1 | #ifndef CONFIG_USER_H | 1 | /* Copyright 2020 Joseph Wasson |
2 | #define CONFIG_USER_H | 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 | */ | ||
3 | 16 | ||
4 | #include QMK_KEYBOARD_CONFIG_H | 17 | #pragma once |
5 | 18 | ||
6 | #define SPACE_COUNT 3 | 19 | #define SPACE_COUNT 3 |
7 | 20 | ||
@@ -18,5 +31,3 @@ | |||
18 | { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ | 31 | { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ |
19 | { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, KC_NO, K4B, K4C, KC_NO }\ | 32 | { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, KC_NO, K4B, K4C, KC_NO }\ |
20 | } | 33 | } |
21 | |||
22 | #endif | ||
diff --git a/keyboards/thevankeyboards/minivan/keymaps/talljoe-minivan/config.h b/keyboards/thevankeyboards/minivan/keymaps/talljoe-minivan/config.h index 26d5e207e..89980614e 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/talljoe-minivan/config.h +++ b/keyboards/thevankeyboards/minivan/keymaps/talljoe-minivan/config.h | |||
@@ -1,7 +1,21 @@ | |||
1 | #ifndef CONFIG_USER_H | 1 | /* Copyright 2020 Joseph Wasson |
2 | #define CONFIG_USER_H | 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 | #pragma once | ||
3 | 18 | ||
4 | #include QMK_KEYBOARD_CONFIG_H | ||
5 | 19 | ||
6 | #define SPACE_COUNT 2 | 20 | #define SPACE_COUNT 2 |
7 | 21 | ||
@@ -15,7 +29,7 @@ | |||
15 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1D, \ | 29 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1D, \ |
16 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ | 30 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ |
17 | K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K0D, \ | 31 | K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K0D, \ |
18 | K41, K49, K42, K44, K45, K3C, K0B, K00, K3D \ | 32 | K41, K49, K42, K44, K46, K3C, K0B, K00, K3D \ |
19 | ) | 33 | ) |
20 | 34 | ||
21 | #define TEMPLATE_ALT( \ | 35 | #define TEMPLATE_ALT( \ |
@@ -28,7 +42,7 @@ | |||
28 | K00, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1D, \ | 42 | K00, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1D, \ |
29 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2C, \ | 43 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2C, \ |
30 | K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ | 44 | K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ |
31 | K41, K49, K42, K44, K45, K48, K49, K4B, K4C \ | 45 | K41, K49, K42, K44, K46, K48, K49, K4B, K4C \ |
32 | ) | 46 | ) |
33 | 47 | ||
34 | #define TEMPLATE_ADJUST( \ | 48 | #define TEMPLATE_ADJUST( \ |
@@ -41,7 +55,7 @@ | |||
41 | K00, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K2D, \ | 55 | K00, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K2D, \ |
42 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2C, \ | 56 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2C, \ |
43 | K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ | 57 | K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ |
44 | K40, K41, K42, K44, K45, K48, K0B, K0C, K4C \ | 58 | K40, K41, K42, K44, K46, K48, K0B, K0C, K4C \ |
45 | ) | 59 | ) |
46 | 60 | ||
47 | #define TEMPLATE_RESET LAYOUT_arrow( \ | 61 | #define TEMPLATE_RESET LAYOUT_arrow( \ |
@@ -49,5 +63,3 @@ | |||
49 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ | 63 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ |
50 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ | 64 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ |
51 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET) | 65 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET) |
52 | |||
53 | #endif | ||
diff --git a/keyboards/tmo50/keymaps/talljoe/config.h b/keyboards/tmo50/keymaps/talljoe/config.h new file mode 100644 index 000000000..53d593385 --- /dev/null +++ b/keyboards/tmo50/keymaps/talljoe/config.h | |||
@@ -0,0 +1,33 @@ | |||
1 | /* Copyright 2020 Joseph Wasson | ||
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 | #pragma once | ||
18 | |||
19 | #define SPACE_COUNT 2 | ||
20 | |||
21 | #define TEMPLATE_TKL(\ | ||
22 | KESC, KF01, KF02, KF03, KF04, KF05, KF06, KF07, KF08, KF09, KF10, KF11, KF12, KSCL, KPRS, KADJ, \ | ||
23 | KGRV, K_1 , K_2 , K_3 , K_4 , K_5 , K_6 , K_7 , K_8 , K_9 , K_0 , KMIN, KEQL, KBLS, KINS, KHOM, KPUP, \ | ||
24 | KTAB, K_Q , K_W , K_E , K_R , K_T , K_Y , K_U , K_I , K_O , K_P , KLBR, KRBR, KBSP, KDEL, KEND, LPDN, \ | ||
25 | KCAP, K_A , K_S , K_D , K_F , K_G , K_H , K_J , K_K , K_L , KSMI, KQUO, KENT, \ | ||
26 | KLSH, K_Z , K_X , K_C , K_V , K_B , K_N , K_M , KCMA, KDOT, KSLS, KRSH, K_UP, \ | ||
27 | KLCT, KLOS, KLAL, KSP2, KSP3, KSP1, KRAL, KROS, KRCT, KPTT, K_LT, K_DN, K_RT \ | ||
28 | ) LAYOUT_all( \ | ||
29 | KF01, KTAB, K_Q , K_W , K_E , K_R , K_T , K_Y , K_U , K_I , K_O , K_P , KLBR, KRBR, KBSP, \ | ||
30 | KF02, KCAP, K_A , K_S , K_D , K_F , K_G , K_H , K_J , K_K , K_L , KSMI, KQUO, KENT, \ | ||
31 | KF03, KLSH, K_Z , K_X , K_C , K_V , K_B , K_N , K_M , KCMA, KDOT, KSLS, KRSH, KADJ, \ | ||
32 | KF04, KLOS, KLAL, KSP2, KSP1, KRAL, KESC \ | ||
33 | ) | ||
diff --git a/keyboards/tmo50/keymaps/talljoe/keymap.c b/keyboards/tmo50/keymaps/talljoe/keymap.c new file mode 100644 index 000000000..fa6523992 --- /dev/null +++ b/keyboards/tmo50/keymaps/talljoe/keymap.c | |||
@@ -0,0 +1,44 @@ | |||
1 | #include "quantum.h" | ||
2 | #include "talljoe.h" | ||
3 | |||
4 | bool process_indicator_led_user(uint32_t state){ | ||
5 | return false; | ||
6 | } | ||
7 | |||
8 | #define LED_MASK (_BV(PB0) | _BV(PB1) | _BV(PB2) | _BV(PB3)) | ||
9 | #define WHITE (_BV(PB0)) | ||
10 | #define YELLOW (_BV(PB1)) | ||
11 | #define MAGENTA (_BV(PB2)) | ||
12 | #define RED (_BV(PB3)) | ||
13 | |||
14 | void matrix_scan_keymap(void) { | ||
15 | uint32_t lights = WHITE; | ||
16 | |||
17 | switch(get_highest_layer(layer_state)) | ||
18 | { | ||
19 | case _NAV: | ||
20 | lights |= YELLOW; | ||
21 | break; | ||
22 | case _NUM: | ||
23 | lights |= MAGENTA; | ||
24 | break; | ||
25 | case _ADJUST: | ||
26 | lights |= RED; | ||
27 | break; | ||
28 | default: { | ||
29 | uint8_t default_layer = get_highest_layer(default_layer_state); | ||
30 | lights = 0; // no white LED by default. | ||
31 | if(default_layer & 1) | ||
32 | lights |= YELLOW; | ||
33 | if(default_layer & 2) | ||
34 | lights |= MAGENTA; | ||
35 | if(default_layer & 4) | ||
36 | lights |= RED; | ||
37 | } | ||
38 | } | ||
39 | |||
40 | uint32_t port = PORTB; | ||
41 | port |= LED_MASK; | ||
42 | port &= ~lights; | ||
43 | PORTB = port; | ||
44 | } | ||
diff --git a/layouts/community/60_ansi/talljoe-ansi/config.h b/layouts/community/60_ansi/talljoe-ansi/config.h index 4326a2fd1..79cc19001 100644 --- a/layouts/community/60_ansi/talljoe-ansi/config.h +++ b/layouts/community/60_ansi/talljoe-ansi/config.h | |||
@@ -1,5 +1,20 @@ | |||
1 | #ifndef CONFIG_USER_H | 1 | /* Copyright 2020 Joseph Wasson |
2 | #define CONFIG_USER_H | 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 | #pragma once | ||
3 | 18 | ||
4 | #include QMK_KEYBOARD_CONFIG_H | 19 | #include QMK_KEYBOARD_CONFIG_H |
5 | 20 | ||
@@ -16,7 +31,5 @@ | |||
16 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ | 31 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ |
17 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ | 32 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ |
18 | K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ | 33 | K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ |
19 | K40, K41, K42, K45, K48, K49, K4B, K4C \ | 34 | K40, K41, K42, K46, K48, K49, K4B, K4C \ |
20 | ) | 35 | ) |
21 | |||
22 | #endif //CONFIG_USER_H | ||
diff --git a/layouts/community/60_ansi_split_bs_rshift/talljoe/config.h b/layouts/community/60_ansi_split_bs_rshift/talljoe/config.h index 65568d3ab..2a2ead227 100644 --- a/layouts/community/60_ansi_split_bs_rshift/talljoe/config.h +++ b/layouts/community/60_ansi_split_bs_rshift/talljoe/config.h | |||
@@ -1,7 +1,20 @@ | |||
1 | #ifndef CONFIG_USER_H | 1 | /* Copyright 2020 Joseph Wasson |
2 | #define CONFIG_USER_H | 2 | * |
3 | 3 | * This program is free software: you can redistribute it and/or modify | |
4 | #include QMK_KEYBOARD_CONFIG_H | 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 | #pragma once | ||
5 | 18 | ||
6 | #define ENABLE_GAME_LAYER | 19 | #define ENABLE_GAME_LAYER |
7 | 20 | ||
@@ -16,7 +29,7 @@ | |||
16 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ | 29 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ |
17 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ | 30 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ |
18 | K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ | 31 | K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ |
19 | K40, K41, K42, K45, K48, K49, K4B, K4C \ | 32 | K40, K41, K42, K46, K48, K49, K4B, K4C \ |
20 | ) | 33 | ) |
21 | 34 | ||
22 | /* Color Map */ | 35 | /* Color Map */ |
@@ -68,5 +81,3 @@ | |||
68 | #define BACKLIGHT_ALPHAS_MODS_ROW_2 0b0011000000000001 | 81 | #define BACKLIGHT_ALPHAS_MODS_ROW_2 0b0011000000000001 |
69 | 82 | ||
70 | #endif //KEYBOARD_zeal60 | 83 | #endif //KEYBOARD_zeal60 |
71 | |||
72 | #endif //CONFIG_USER_H | ||
diff --git a/layouts/community/60_ansi_split_bs_rshift/talljoe/solarized.c b/layouts/community/60_ansi_split_bs_rshift/talljoe/solarized.c index 3e9e726b9..617132d4e 100644 --- a/layouts/community/60_ansi_split_bs_rshift/talljoe/solarized.c +++ b/layouts/community/60_ansi_split_bs_rshift/talljoe/solarized.c | |||
@@ -1,3 +1,19 @@ | |||
1 | /* Copyright 2020 Joseph Wasson | ||
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 | |||
1 | #include "solarized.h" | 17 | #include "solarized.h" |
2 | 18 | ||
3 | #define MAKE_COLOR(_H, _S, _V) \ | 19 | #define MAKE_COLOR(_H, _S, _V) \ |
diff --git a/layouts/community/60_ansi_split_bs_rshift/talljoe/solarized.h b/layouts/community/60_ansi_split_bs_rshift/talljoe/solarized.h index 3b00caea7..15e3d588b 100644 --- a/layouts/community/60_ansi_split_bs_rshift/talljoe/solarized.h +++ b/layouts/community/60_ansi_split_bs_rshift/talljoe/solarized.h | |||
@@ -1,5 +1,20 @@ | |||
1 | #ifndef SOLARIZED_H | 1 | /* Copyright 2020 Joseph Wasson |
2 | #define SOLARIZED_H | 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 | #pragma once | ||
3 | 18 | ||
4 | #include "quantum/color.h" | 19 | #include "quantum/color.h" |
5 | 20 | ||
@@ -23,5 +38,3 @@ typedef struct { | |||
23 | } solarized_t; | 38 | } solarized_t; |
24 | 39 | ||
25 | extern solarized_t solarized; | 40 | extern solarized_t solarized; |
26 | |||
27 | #endif | ||
diff --git a/layouts/community/60_hhkb/talljoe-hhkb/config.h b/layouts/community/60_hhkb/talljoe-hhkb/config.h index 54756a940..0424fee1f 100644 --- a/layouts/community/60_hhkb/talljoe-hhkb/config.h +++ b/layouts/community/60_hhkb/talljoe-hhkb/config.h | |||
@@ -1,5 +1,20 @@ | |||
1 | #ifndef CONFIG_USER_H | 1 | /* Copyright 2020 Joseph Wasson |
2 | #define CONFIG_USER_H | 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 | #pragma once | ||
3 | 18 | ||
4 | #include QMK_KEYBOARD_CONFIG_H | 19 | #include QMK_KEYBOARD_CONFIG_H |
5 | 20 | ||
@@ -16,10 +31,9 @@ | |||
16 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ | 31 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ |
17 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ | 32 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ |
18 | K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ | 33 | K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ |
19 | K41, K42, K45, K48, K4C \ | 34 | K41, K42, K46, K48, K4C \ |
20 | ) | 35 | ) |
21 | 36 | ||
22 | #ifdef RGB_BACKLIGHT_M60_A | 37 | #ifdef RGB_BACKLIGHT_M60_A |
23 | #define ZEAL_RGB | 38 | #define ZEAL_RGB |
24 | #endif | 39 | #endif |
25 | #endif //CONFIG_USER_H | ||
diff --git a/layouts/community/ortho_4x12/talljoe/config.h b/layouts/community/ortho_4x12/talljoe/config.h index 61229e7f6..34c24b862 100644 --- a/layouts/community/ortho_4x12/talljoe/config.h +++ b/layouts/community/ortho_4x12/talljoe/config.h | |||
@@ -1,7 +1,21 @@ | |||
1 | #ifndef CONFIG_USER_H | 1 | /* Copyright 2020 Joseph Wasson |
2 | #define CONFIG_USER_H | 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 | #pragma once | ||
3 | 18 | ||
4 | #include QMK_KEYBOARD_CONFIG_H | ||
5 | #define SPACE_COUNT 3 | 19 | #define SPACE_COUNT 3 |
6 | 20 | ||
7 | #define TEMPLATE( \ | 21 | #define TEMPLATE( \ |
@@ -17,6 +31,3 @@ LAYOUT_ortho_4x12( \ | |||
17 | K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ | 31 | K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ |
18 | K40, K41, K0D, K42, K44, K45, K45, K46, K48, K49, K4B, K4C \ | 32 | K40, K41, K0D, K42, K44, K45, K45, K46, K48, K49, K4B, K4C \ |
19 | ) | 33 | ) |
20 | |||
21 | |||
22 | #endif //CONFIG_USER_H | ||
diff --git a/layouts/community/tkl_ansi/talljoe-tkl/config.h b/layouts/community/tkl_ansi/talljoe-tkl/config.h index 02f8a94e3..15869ed0b 100644 --- a/layouts/community/tkl_ansi/talljoe-tkl/config.h +++ b/layouts/community/tkl_ansi/talljoe-tkl/config.h | |||
@@ -1,5 +1,20 @@ | |||
1 | #ifndef CONFIG_USER_H | 1 | /* Copyright 2020 Joseph Wasson |
2 | #define CONFIG_USER_H | 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 | #pragma once | ||
3 | 18 | ||
4 | #include QMK_KEYBOARD_CONFIG_H | 19 | #include QMK_KEYBOARD_CONFIG_H |
5 | 20 | ||
@@ -18,7 +33,5 @@ | |||
18 | KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \ | 33 | KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \ |
19 | KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ | 34 | KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ |
20 | KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ | 35 | KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ |
21 | KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ | 36 | KA4, KP2, KC6, KX2, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ |
22 | ) | 37 | ) |
23 | |||
24 | #endif //CONFIG_USER_H | ||
diff --git a/users/talljoe/config.h b/users/talljoe/config.h index 33374014d..8a5fd50cb 100644 --- a/users/talljoe/config.h +++ b/users/talljoe/config.h | |||
@@ -1,5 +1,19 @@ | |||
1 | #ifndef USERSPACE_CONFIG_H | 1 | /* Copyright 2020 Joseph Wasson |
2 | #define USERSPACE_CONFIG_H | 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 | ||
3 | 17 | ||
4 | #define PERMISSIVE_HOLD | 18 | #define PERMISSIVE_HOLD |
5 | 19 | ||
@@ -9,4 +23,5 @@ | |||
9 | #define BOOTMAGIC_KEY_SKIP KC_I | 23 | #define BOOTMAGIC_KEY_SKIP KC_I |
10 | #define BOOTMAGIC_KEY_EEPROM_CLEAR KC_E | 24 | #define BOOTMAGIC_KEY_EEPROM_CLEAR KC_E |
11 | 25 | ||
12 | #endif // !USERSPACE_CONFIG_H | 26 | #define COMBO_COUNT 2 |
27 | #define COMBO_TERM 250 | ||
diff --git a/users/talljoe/macros.c b/users/talljoe/macros.c new file mode 100644 index 000000000..db8d28d4c --- /dev/null +++ b/users/talljoe/macros.c | |||
@@ -0,0 +1,40 @@ | |||
1 | /* Copyright 2020 Joseph Wasson | ||
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 | #include "talljoe.h" | ||
17 | |||
18 | extern keymap_config_t keymap_config; | ||
19 | |||
20 | ostype_t get_os() { | ||
21 | if(keymap_config.swap_lalt_lgui) { | ||
22 | return MACOSX; | ||
23 | } | ||
24 | |||
25 | return WINDOWS; | ||
26 | } | ||
27 | |||
28 | #define IS_OSX() (get_os() == MACOSX) | ||
29 | |||
30 | #define MOD_SEND(KEY) (IS_OSX() ? SEND_STRING(SS_LCMD(KEY)) : SEND_STRING(SS_LCTRL(KEY))) | ||
31 | |||
32 | void macro_copy() { MOD_SEND("c"); } | ||
33 | void macro_paste() { MOD_SEND("v"); } | ||
34 | void macro_lock() { | ||
35 | if (IS_OSX()) { | ||
36 | SEND_STRING(SS_LCTRL(SS_LCMD("q"))); | ||
37 | } else { | ||
38 | SEND_STRING(SS_LGUI("l")); | ||
39 | } | ||
40 | } | ||
diff --git a/users/talljoe/macros.h b/users/talljoe/macros.h new file mode 100644 index 000000000..832d4403f --- /dev/null +++ b/users/talljoe/macros.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* Copyright 2020 Joseph Wasson | ||
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 | typedef enum OSTYPE { | ||
18 | WINDOWS, | ||
19 | MACOSX, | ||
20 | LINUX | ||
21 | } ostype_t; | ||
22 | |||
23 | ostype_t get_os(void); | ||
24 | |||
25 | void macro_copy(void); | ||
26 | void macro_paste(void); | ||
27 | void macro_lock(void); | ||
diff --git a/users/talljoe/rules.mk b/users/talljoe/rules.mk index e0a71561f..42ffb411a 100644 --- a/users/talljoe/rules.mk +++ b/users/talljoe/rules.mk | |||
@@ -1,4 +1,11 @@ | |||
1 | SRC += talljoe.c tapdance.c | 1 | SRC += talljoe.c macros.c $(wildcard users/talljoe/tapdance/*.c) |
2 | ifeq ($(strip $(VISUALIZER_ENABLE)), yes) | ||
3 | SRC += visualizer.c | ||
4 | endif | ||
5 | |||
6 | ifeq ($(strip $(FLASH_BOOTLOADER)), yes) | ||
7 | OPT_DEFS += -DFLASH_BOOTLOADER | ||
8 | endif | ||
2 | 9 | ||
3 | EXTRAFLAGS+=-flto | 10 | EXTRAFLAGS+=-flto |
4 | 11 | ||
diff --git a/users/talljoe/talljoe.c b/users/talljoe/talljoe.c index a533ff610..517f712ec 100644 --- a/users/talljoe/talljoe.c +++ b/users/talljoe/talljoe.c | |||
@@ -1,3 +1,18 @@ | |||
1 | /* Copyright 2020 Joseph Wasson | ||
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 | */ | ||
1 | #include QMK_KEYBOARD_H | 16 | #include QMK_KEYBOARD_H |
2 | 17 | ||
3 | #include "talljoe.h" | 18 | #include "talljoe.h" |
@@ -5,14 +20,31 @@ | |||
5 | #include "../../../keyboards/wilba_tech/wt_rgb_backlight.h" | 20 | #include "../../../keyboards/wilba_tech/wt_rgb_backlight.h" |
6 | #endif | 21 | #endif |
7 | 22 | ||
23 | #ifdef VISUALIZER_ENABLE | ||
24 | const char layer_names[32][16] = { | ||
25 | [_BASE] = "QWERTY", | ||
26 | [_WORKMAN] = "Workman", | ||
27 | [_NORMAN] = "Norman", | ||
28 | [_DVORAK] = "Dvorak", | ||
29 | [_COLMAK] = "Colmak", | ||
30 | [_MALTROFF] = "Maltroff", | ||
31 | [_NORTRON] = "Nortron", | ||
32 | [_GAME] = "Game", | ||
33 | [_NAV] = "Navigation", | ||
34 | [_NUM] = "Numpad", | ||
35 | [_ADJUST] = "Adjust", | ||
36 | [_RESET] = "Reset", | ||
37 | }; | ||
38 | #endif | ||
39 | |||
8 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 40 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
9 | [_BASE] = TEMPLATE_TKL( | 41 | [_BASE] = TEMPLATE_TKL( |
10 | KC_ESC, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PSCR, KC_SLCK, MO_ADJ , | 42 | US_LOCK, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PSCR, KC_SLCK, MO_ADJ , |
11 | US_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , US_BSLS, KC_INS , KC_HOME, KC_PGUP, | 43 | US_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , US_BSLS, KC_INS , KC_HOME, KC_PGUP, |
12 | US_TAB , KC_Q, KC_W, KC_E, KC_R, KC_T , KC_Y, KC_U, KC_I, KC_O, KC_P , KC_LBRC, KC_RBRC, KC_BSPC, KC_DEL , KC_END , KC_PGDN, | 44 | US_TAB , KC_Q, KC_W, KC_E, KC_R, KC_T , KC_Y, KC_U, KC_I, KC_O, KC_P , KC_LBRC, KC_RBRC, KC_BSPC, KC_DEL , KC_END , KC_PGDN, |
13 | CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G , KC_H, KC_J, KC_K, KC_L, US_SCLN, KC_QUOT, US_ENT , | 45 | CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G , KC_H, KC_J, KC_K, KC_L, US_SCLN, KC_QUOT, US_ENT , |
14 | SH_LBRC, KC_Z, KC_X, KC_C, KC_V, KC_B , KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SH_RBRC, KC_UP , | 46 | SH_LBRC, KC_Z, KC_X, KC_C, KC_V, KC_B , KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SH_RBRC, KC_UP , |
15 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC2, KC_SPC1, KC_SPC3, KC_RALT, KC_RGUI, KC_RCTL, KC_PTT , KC_LEFT, KC_DOWN, KC_RGHT), | 47 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC2, KC_SPC3, KC_SPC1, KC_RALT, KC_RGUI, KC_RCTL, KC_PTT , KC_LEFT, KC_DOWN, KC_RGHT), |
16 | [_WORKMAN] = TEMPLATE( | 48 | [_WORKMAN] = TEMPLATE( |
17 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | 49 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, |
18 | _______, KC_Q , KC_D , KC_R , KC_W , KC_B , KC_J , KC_F , KC_U , KC_P , US_SCLN, _______, _______, _______, | 50 | _______, KC_Q , KC_D , KC_R , KC_W , KC_B , KC_J , KC_F , KC_U , KC_P , US_SCLN, _______, _______, _______, |
@@ -42,9 +74,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
42 | [_MALTROFF] = TEMPLATE( | 74 | [_MALTROFF] = TEMPLATE( |
43 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | 75 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, |
44 | _______, KC_Q, KC_P, KC_Y, KC_G, KC_B , KC_J, KC_M, KC_U, KC_K, KC_L, _______, _______, _______, | 76 | _______, KC_Q, KC_P, KC_Y, KC_G, KC_B , KC_J, KC_M, KC_U, KC_K, KC_L, _______, _______, _______, |
45 | _______, KC_A, KC_N, KC_I, KC_S, KC_F , KC_D, KC_T, KC_H, KC_O, KC_R , US_ENT , KC_BSPC, | 77 | _______, KC_A, KC_N, KC_I, KC_S, KC_F , KC_D, KC_T, KC_H, KC_O, KC_R , _______, _______, |
46 | _______, KC_Z, KC_X, KC_C, KC_V, US_QUOT, KC_SCLN, KC_W, KC_COMM, KC_DOT, KC_SLSH, _______, _______, | 78 | _______, KC_Z, KC_X, KC_C, KC_V, KC_SCLN, KC_BSPC, KC_W, KC_COMM, KC_DOT, KC_SLSH, _______, _______, |
47 | _______, _______, _______, MLT_E , _______, _______, _______, _______, _______, _______), | 79 | _______, _______, _______, MLT_E , _______, _______, _______, _______, _______, _______), |
80 | // It's Norman but like Maltron | ||
81 | [_NORTRON] = TEMPLATE( | ||
82 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
83 | _______, KC_Q , KC_W , KC_D , KC_F , KC_K , KC_J , KC_U , KC_BSPC, KC_L , US_SCLN, _______, _______, _______, | ||
84 | _______, KC_A , KC_S , KC_I , KC_T , KC_G , KC_Y , KC_N , KC_R , KC_O , KC_H , _______, _______, | ||
85 | _______, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_P , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______, | ||
86 | _______, _______, _______, MLT_E , US_ENT , _______, _______, _______, _______, _______), | ||
48 | #endif | 87 | #endif |
49 | #ifdef ENABLE_GAME_LAYER | 88 | #ifdef ENABLE_GAME_LAYER |
50 | [_GAME] = TEMPLATE( | 89 | [_GAME] = TEMPLATE( |
@@ -57,27 +96,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
57 | [_NAV] = TEMPLATE_NAV( | 96 | [_NAV] = TEMPLATE_NAV( |
58 | KC_GRV , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , XXXXXXX, XXXXXXX, | 97 | KC_GRV , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , XXXXXXX, XXXXXXX, |
59 | US_TAB , KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_INS , KC_PGUP, KC_UP , KC_PGDN, KC_BTN1, KC_BTN3, KC_BTN2, KC_DEL , | 98 | US_TAB , KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_INS , KC_PGUP, KC_UP , KC_PGDN, KC_BTN1, KC_BTN3, KC_BTN2, KC_DEL , |
60 | CTL_ESC, KC_LCBR, KC_RCBR, KC_LPRN, KC_RPRN, KC_AMPR, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END , US_QUOT, TG_ADJ , | 99 | CTL_ESC, KC_LCBR, KC_RCBR, KC_LPRN, KC_RPRN, KC_AMPR, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END , KC_BSPC, TG_ADJ , |
61 | KC_LSFT, KC_EQL, KC_PLUS, KC_MINS, KC_UNDS, KC_ASTR, KC_CALC, US_GRV , KC_WBAK, KC_WFWD, KC_WREF, KC_RSFT, KC_APP , | 100 | KC_LSFT, KC_EQL, KC_PLUS, KC_MINS, KC_UNDS, KC_ASTR, KC_CALC, US_GRV , KC_WBAK, KC_WFWD, KC_WREF, KC_RSFT, KC_APP , |
62 | KC_LCTL, KC_LGUI, KC_LALT, NV_SPC2, NV_SPC1, NV_SPC3, KC_RALT, KC_RGUI, KC_RCTL, KC_PTT ), | 101 | KC_LCTL, KC_LGUI, KC_LALT, NV_SPC2, NV_SPC3, NV_SPC1, KC_RALT, KC_RGUI, KC_RCTL, KC_PTT ), |
63 | [_NUM] = TEMPLATE_NUM( | 102 | [_NUM] = TEMPLATE_NUM( |
64 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | 103 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, |
65 | KC_GRV , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_VOLU, KC_CIRC, KC_7, KC_8, KC_9, KC_PMNS, XXXXXXX, XXXXXXX, KC_DEL , | 104 | KC_GRV , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_VOLU, KC_CIRC, KC_7, KC_8, KC_9, KC_PMNS, XXXXXXX, XXXXXXX, KC_DEL , |
66 | CTL_ESC, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_MUTE, KC_PENT, KC_4, KC_5, KC_6, KC_PPLS, XXXXXXX, KC_ENT , | 105 | CTL_ESC, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_MUTE, KC_PENT, KC_4, KC_5, KC_6, KC_PPLS, KC_BSPC, KC_ENT , |
67 | KC_LSFT, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_VOLD, KC_PIPE, KC_1, KC_2, KC_3, KC_PAST, KC_PSLS, TG_NUM , | 106 | KC_LSFT, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_VOLD, KC_PIPE, KC_1, KC_2, KC_3, KC_PAST, KC_PSLS, TG_NUM , |
68 | KC_LCTL, KC_LGUI, KC_LALT, NM_SPC2, NM_SPC1, NM_SPC3, KC_PDOT, KC_PCMM, KC_RCTL, KC_PTT ), | 107 | KC_LCTL, KC_LGUI, KC_LALT, NM_SPC2, NM_SPC3, NM_SPC1, KC_PDOT, KC_PCMM, KC_RCTL, KC_PTT ), |
69 | // Adjust layer is on the split-shift key; or NAV+Enter (for non-split keyboards) | 108 | // Adjust layer is on the split-shift key; or NAV+Enter (for non-split keyboards) |
70 | [_ADJUST] = TEMPLATE_ADJUST( | 109 | [_ADJUST] = TEMPLATE_ADJUST( |
71 | MO_RST , FX(1) , FX(2) , FX(3) , FX(4) , FX(5) , FX(6) , FX(7) , FX(8) , FX(9) , FX(10) , BR_DEC , BR_INC , XXXXXXX, MO_RST , | 110 | MO_RST , FX(1) , FX(2) , FX(3) , FX(4) , FX(5) , FX(6) , FX(7) , FX(8) , FX(9) , FX(10) , BR_DEC , BR_INC , XXXXXXX, MO_RST , |
72 | MO_RST , H1_INC , S1_INC , H2_INC , S2_INC , EF_INC , RGB_HUI, RGB_SAI, RGB_MOD, RGB_M_P, DFAULTS, RGB_VAD, RGB_VAI, MO_RST , | 111 | MO_RST , H1_INC , S1_INC , H2_INC , S2_INC , EF_INC , RGB_HUI, RGB_SAI, RGB_MOD, RGB_M_P, DFAULTS, RGB_VAD, RGB_VAI, MO_RST , |
73 | XXXXXXX, H1_DEC , S1_DEC , H2_DEC , S2_DEC , EF_DEC , RGB_HUD, RGB_SAD, RGB_RMOD,RGB_M_K, RGB_M_B, RGB_M_G, TG_ADJ , | 112 | XXXXXXX, H1_DEC , S1_DEC , H2_DEC , S2_DEC , EF_DEC , RGB_HUD, RGB_SAD, RGB_RMOD,RGB_M_K, RGB_M_B, RGB_M_G, TG_ADJ , |
74 | TG_NKRO, LY_QWER, LY_WORK, LY_NRMN, LY_DVRK, LY_CLMK, XXXXXXX, LY_MALT, XXXXXXX, XXXXXXX, KC_MAKE, KC_CAPS, XXXXXXX, | 113 | TG_NKRO, LY_QWER, LY_WORK, LY_CLMK, LY_DVRK, LY_NTRN, LY_NRMN, LY_MALT, XXXXXXX, XXXXXXX, KC_MAKE, KC_CAPS, XXXXXXX, |
75 | MO_RST , AG_SWAP, AG_NORM, XXXXXXX, BL_TOGG, XXXXXXX, RGB_TOG, XXXXXXX, XXXXXXX, TG_GAME), | 114 | MO_RST , AG_SWAP, AG_NORM, XXXXXXX, XXXXXXX, BL_TOGG, RGB_TOG, XXXXXXX, XXXXXXX, TG_GAME), |
76 | // To Reset hit FN + ` + Esc | 115 | // To Reset hit FN + ` + Esc |
77 | [_RESET] = TEMPLATE_RESET, | 116 | [_RESET] = TEMPLATE_RESET, |
78 | }; | 117 | }; |
79 | 118 | ||
119 | __attribute__((weak)) | ||
120 | void matrix_scan_keymap(void) { | ||
121 | } | ||
122 | |||
80 | void matrix_scan_user(void) { | 123 | void matrix_scan_user(void) { |
124 | matrix_scan_keymap(); | ||
125 | |||
81 | #ifdef KEYBOARD_gh60 | 126 | #ifdef KEYBOARD_gh60 |
82 | if (IS_LAYER_ON(_GAME)) { | 127 | if (IS_LAYER_ON(_GAME)) { |
83 | gh60_wasd_leds_on(); | 128 | gh60_wasd_leds_on(); |
@@ -140,16 +185,21 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
140 | switch (keycode) { | 185 | switch (keycode) { |
141 | case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader | 186 | case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader |
142 | if (!record->event.pressed) { | 187 | if (!record->event.pressed) { |
143 | SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP | 188 | uint8_t temp_mod = get_mods(); |
144 | 189 | uint8_t temp_osm = get_oneshot_mods(); | |
145 | #if defined(BOOTLOADER_HALFKAY) | 190 | clear_mods(); clear_oneshot_mods(); |
146 | ":teensy" | 191 | SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP); |
147 | #elif defined(BOOTLOADER_CATERINA) | 192 | #ifndef FLASH_BOOTLOADER |
148 | ":avrdude" | 193 | if ((temp_mod | temp_osm) & MOD_MASK_SHIFT) |
149 | #else | 194 | #endif |
150 | ":dfu" | 195 | { |
151 | #endif | 196 | SEND_STRING(":flash"); |
152 | SS_TAP(X_ENTER)); | 197 | } |
198 | if ((temp_mod | temp_osm) & MOD_MASK_CTRL) { | ||
199 | SEND_STRING(" -j8 --output-sync"); | ||
200 | } | ||
201 | tap_code(KC_ENT); | ||
202 | set_mods(temp_mod); | ||
153 | } | 203 | } |
154 | return false; | 204 | return false; |
155 | break; | 205 | break; |
diff --git a/users/talljoe/talljoe.h b/users/talljoe/talljoe.h index 496a6222a..f151bde68 100644 --- a/users/talljoe/talljoe.h +++ b/users/talljoe/talljoe.h | |||
@@ -1,7 +1,24 @@ | |||
1 | #ifndef USERSPACE | 1 | /* Copyright 2020 Joseph Wasson |
2 | #define USERSPACE | 2 | * |
3 | 3 | * This program is free software: you can redistribute it and/or modify | |
4 | #include "quantum.h" | 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 | #pragma once | ||
18 | |||
19 | #include QMK_KEYBOARD_H | ||
20 | #include "tapdance/tapdance.h" | ||
21 | #include "macros.h" | ||
5 | 22 | ||
6 | enum userspace_custom_keycodes { | 23 | enum userspace_custom_keycodes { |
7 | KC_MAKE = SAFE_RANGE, // can always be here | 24 | KC_MAKE = SAFE_RANGE, // can always be here |
@@ -22,6 +39,7 @@ enum layers { | |||
22 | _DVORAK, | 39 | _DVORAK, |
23 | _COLMAK, | 40 | _COLMAK, |
24 | _MALTROFF, | 41 | _MALTROFF, |
42 | _NORTRON, | ||
25 | _GAME, | 43 | _GAME, |
26 | _NAV, | 44 | _NAV, |
27 | _NUM, | 45 | _NUM, |
@@ -29,14 +47,12 @@ enum layers { | |||
29 | _RESET = RESET_LAYER, | 47 | _RESET = RESET_LAYER, |
30 | }; | 48 | }; |
31 | 49 | ||
32 | enum tap_dancers { | 50 | #ifdef VISUALIZER_ENABLE |
33 | TD_SEMICOLON, | 51 | extern const char layer_names[][16]; |
34 | TD_GRAVE, | 52 | #endif |
35 | TD_QUOTE, | ||
36 | }; | ||
37 | 53 | ||
38 | #define MO_NAV MO(_NAV) | 54 | #define MO_NAV MO(_NAV) |
39 | #define MO_ADJ MO(_ADJUST) | 55 | #define MO_ADJ TD(TD_FUNCTION) |
40 | #define MO_RST MO(_RESET) | 56 | #define MO_RST MO(_RESET) |
41 | #define TG_ADJ TG(_ADJUST) | 57 | #define TG_ADJ TG(_ADJUST) |
42 | #define TG_NUM TG(_NUM) | 58 | #define TG_NUM TG(_NUM) |
@@ -52,8 +68,10 @@ enum tap_dancers { | |||
52 | #define LY_CLMK DF(_COLMAK) | 68 | #define LY_CLMK DF(_COLMAK) |
53 | #if SPACE_COUNT >= 2 | 69 | #if SPACE_COUNT >= 2 |
54 | #define LY_MALT DF(_MALTROFF) | 70 | #define LY_MALT DF(_MALTROFF) |
71 | #define LY_NTRN DF(_NORTRON) | ||
55 | #else | 72 | #else |
56 | #define LY_MALT KC_NO | 73 | #define LY_MALT KC_NO |
74 | #define LY_NTRN KC_NO | ||
57 | #endif | 75 | #endif |
58 | #define TG_NKRO MAGIC_TOGGLE_NKRO | 76 | #define TG_NKRO MAGIC_TOGGLE_NKRO |
59 | #define KC_PTT KC_F24 | 77 | #define KC_PTT KC_F24 |
@@ -66,61 +84,29 @@ enum tap_dancers { | |||
66 | #define US_BSLS LCA_T(KC_BSLS) | 84 | #define US_BSLS LCA_T(KC_BSLS) |
67 | #define US_SCLN TD(TD_SEMICOLON) | 85 | #define US_SCLN TD(TD_SEMICOLON) |
68 | #define US_GRV TD(TD_GRAVE) | 86 | #define US_GRV TD(TD_GRAVE) |
69 | #define US_QUOT TD(TD_QUOTE) | ||
70 | #define US_TAB C_S_T(KC_TAB) | 87 | #define US_TAB C_S_T(KC_TAB) |
71 | #define SH_LBRC LSFT_T(KC_LBRC) | 88 | #define SH_LBRC LSFT_T(KC_LBRC) |
72 | #define SH_RBRC RSFT_T(KC_RBRC) | 89 | #define SH_RBRC RSFT_T(KC_RBRC) |
90 | #define US_LOCK TD(TD_LOCK) | ||
73 | 91 | ||
74 | #define MLT_E LT(_NUM, KC_E) | 92 | #define MLT_E LT(_NUM, KC_E) |
75 | 93 | ||
76 | #ifndef SPACE_COUNT | 94 | #ifndef SWAP_HANDS_ENABLE |
77 | #define SPACE_COUNT 1 | 95 | #define SH_T |
78 | #endif | ||
79 | #if (SPACE_COUNT == 1) | ||
80 | #define KC_SPC1 LT(_NAV, KC_SPC) | ||
81 | #define KC_SPC2 XXXXXXX | ||
82 | #define KC_SPC3 XXXXXXX | ||
83 | |||
84 | #define NV_SPC1 _______ | ||
85 | #define NV_SPC2 _______ | ||
86 | #define NV_SPC3 _______ | ||
87 | |||
88 | #define NM_SPC1 _______ | ||
89 | #define NM_SPC2 _______ | ||
90 | #define NM_SPC3 _______ | ||
91 | #elif (SPACE_COUNT == 2) | ||
92 | #define KC_SPC1 LT(_NAV,KC_SPC) | ||
93 | #define KC_SPC2 LT(_NUM,KC_ENT) | ||
94 | |||
95 | #define NV_SPC1 KC_SPC | ||
96 | #define NV_SPC2 KC_ENT | ||
97 | |||
98 | #define NM_SPC1 KC_0 | ||
99 | #define NM_SPC2 KC_SPC | ||
100 | |||
101 | #define KC_SPC3 XXXXXXX | ||
102 | #define NV_SPC3 XXXXXXX | ||
103 | #define NM_SPC3 XXXXXXX | ||
104 | #elif (SPACE_COUNT == 3) | ||
105 | #ifdef SWAP_HANDS_ENABLE | ||
106 | #define KC_SPC1 SH_T(KC_BSPC) | ||
107 | #else | ||
108 | #define KC_SPC1 KC_BSPC | ||
109 | #endif | ||
110 | #define KC_SPC2 LT(_NUM,KC_ENT) | ||
111 | #define KC_SPC3 LT(_NAV,KC_SPC) | ||
112 | |||
113 | #define NV_SPC1 KC_SPC | ||
114 | #define NV_SPC2 KC_ENT | ||
115 | #define NV_SPC3 KC_SPC | ||
116 | |||
117 | #define NM_SPC1 KC_SPC | ||
118 | #define NM_SPC2 XXXXXXX | ||
119 | #define NM_SPC3 KC_0 | ||
120 | #else | ||
121 | #error "Unsupported space count:" SPACE_COUNT | ||
122 | #endif | 96 | #endif |
123 | 97 | ||
98 | #define KC_SPC1 LT(_NAV,KC_SPC) | ||
99 | #define KC_SPC2 LT(_NUM,KC_ENT) | ||
100 | #define KC_SPC3 SH_T(KC_BSPC) | ||
101 | |||
102 | #define NV_SPC1 KC_SPC | ||
103 | #define NV_SPC2 KC_ENT | ||
104 | #define NV_SPC3 KC_SPC | ||
105 | |||
106 | #define NM_SPC1 KC_0 | ||
107 | #define NM_SPC2 XXXXXXX | ||
108 | #define NM_SPC3 KC_SPC | ||
109 | |||
124 | #ifndef ZEAL_RGB | 110 | #ifndef ZEAL_RGB |
125 | #define BR_INC KC_NO | 111 | #define BR_INC KC_NO |
126 | #define BR_DEC KC_NO | 112 | #define BR_DEC KC_NO |
@@ -195,5 +181,3 @@ enum tap_dancers { | |||
195 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ | 181 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ |
196 | RESET , XXXXXXX, XXXXXXX, XXXXXXX, RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX) | 182 | RESET , XXXXXXX, XXXXXXX, XXXXXXX, RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX) |
197 | #endif | 183 | #endif |
198 | |||
199 | #endif | ||
diff --git a/users/talljoe/tapdance.c b/users/talljoe/tapdance.c deleted file mode 100644 index c4d6025f0..000000000 --- a/users/talljoe/tapdance.c +++ /dev/null | |||
@@ -1,146 +0,0 @@ | |||
1 | //Tap Dance | ||
2 | #include "talljoe.h" | ||
3 | |||
4 | enum { | ||
5 | SINGLE_TAP = 1, | ||
6 | SINGLE_HOLD = 2, | ||
7 | DOUBLE_TAP = 3, | ||
8 | DOUBLE_HOLD = 4, | ||
9 | DOUBLE_SINGLE_TAP = 5, //send two single taps | ||
10 | TRIPLE_TAP = 6, | ||
11 | TRIPLE_HOLD = 7, | ||
12 | SPECIAL = 8 | ||
13 | }; | ||
14 | |||
15 | static struct { | ||
16 | int quote; | ||
17 | int semicolon; | ||
18 | } tap_state = {0}; | ||
19 | |||
20 | int cur_dance (qk_tap_dance_state_t *state) { | ||
21 | if (state->count == 1) { | ||
22 | //If count = 1, and it has been interrupted - it doesn't matter if it is pressed or not: Send SINGLE_TAP | ||
23 | if (state->interrupted) { | ||
24 | // if (!state->pressed) return SINGLE_TAP; | ||
25 | //need "permissive hold" here. | ||
26 | // else return SINGLE_HOLD; | ||
27 | //If the interrupting key is released before the tap-dance key, then it is a single HOLD | ||
28 | //However, if the tap-dance key is released first, then it is a single TAP | ||
29 | //But how to get access to the state of the interrupting key???? | ||
30 | return SINGLE_TAP; | ||
31 | } | ||
32 | else { | ||
33 | if (!state->pressed) return SINGLE_TAP; | ||
34 | else return SINGLE_HOLD; | ||
35 | } | ||
36 | } | ||
37 | //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated | ||
38 | //with single tap. | ||
39 | else if (state->count == 2) { | ||
40 | if (state->interrupted) return DOUBLE_SINGLE_TAP; | ||
41 | else if (state->pressed) return DOUBLE_HOLD; | ||
42 | else return DOUBLE_TAP; | ||
43 | } | ||
44 | else if ((state->count == 3) && ((state->interrupted) || (!state->pressed))) return TRIPLE_TAP; | ||
45 | else if (state->count == 3) return TRIPLE_HOLD; | ||
46 | else return SPECIAL; | ||
47 | } | ||
48 | |||
49 | int hold_cur_dance (qk_tap_dance_state_t *state) { | ||
50 | if (state->count == 1) { | ||
51 | if (state->interrupted) { | ||
52 | if (!state->pressed) return SINGLE_TAP; | ||
53 | else return SINGLE_HOLD; | ||
54 | } | ||
55 | else { | ||
56 | if (!state->pressed) return SINGLE_TAP; | ||
57 | else return SINGLE_HOLD; | ||
58 | } | ||
59 | } | ||
60 | //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated | ||
61 | //with single tap. | ||
62 | else if (state->count == 2) { | ||
63 | if (state->pressed) return DOUBLE_HOLD; | ||
64 | else return DOUBLE_TAP; | ||
65 | } | ||
66 | else if (state->count == 3) { | ||
67 | if (!state->pressed) return TRIPLE_TAP; | ||
68 | else return TRIPLE_HOLD; | ||
69 | } | ||
70 | else return SPECIAL; | ||
71 | } | ||
72 | |||
73 | // Send semi-colon + enter on two taps | ||
74 | void tap_dance_semicolon_finished(qk_tap_dance_state_t *state, void *user_data) { | ||
75 | tap_state.semicolon = hold_cur_dance(state); | ||
76 | switch (tap_state.semicolon) { | ||
77 | case SINGLE_TAP: case DOUBLE_HOLD: register_code(KC_SCLN); break; | ||
78 | case SINGLE_HOLD: layer_on(_NUM); break; | ||
79 | } | ||
80 | } | ||
81 | |||
82 | void tap_dance_semicolon_reset(qk_tap_dance_state_t *state, void *user_data) { | ||
83 | switch (tap_state.semicolon) { | ||
84 | case SINGLE_TAP: case DOUBLE_HOLD: unregister_code(KC_SCLN); break; | ||
85 | case DOUBLE_TAP: { | ||
86 | if (get_mods()) { | ||
87 | SEND_STRING(";;"); // send normal when mods are pressed | ||
88 | } | ||
89 | else { | ||
90 | SEND_STRING(";\n"); | ||
91 | } | ||
92 | break; | ||
93 | } | ||
94 | case TRIPLE_TAP: { | ||
95 | SEND_STRING(";\n\n"); | ||
96 | } | ||
97 | case SPECIAL: layer_invert(_NUM); break; | ||
98 | case SINGLE_HOLD: layer_off(_NUM); break; | ||
99 | } | ||
100 | tap_state.semicolon = 0; | ||
101 | } | ||
102 | |||
103 | // Send `. ~. ``` | ||
104 | void tap_dance_grave_finished(qk_tap_dance_state_t *state, void *user_data) { | ||
105 | switch(state->count) { | ||
106 | case 1: | ||
107 | SEND_STRING("`"); | ||
108 | break; | ||
109 | case 2: | ||
110 | SEND_STRING("~"); | ||
111 | break; | ||
112 | } | ||
113 | } | ||
114 | |||
115 | void tap_dance_grave_each(qk_tap_dance_state_t *state, void *user_data) { | ||
116 | if(state->count == 3) { | ||
117 | SEND_STRING("```"); | ||
118 | } else if (state->count > 3) { | ||
119 | SEND_STRING("`"); | ||
120 | } | ||
121 | } | ||
122 | |||
123 | |||
124 | void tap_dance_quote_finished(qk_tap_dance_state_t *state, void *user_data) { | ||
125 | tap_state.quote = hold_cur_dance(state); | ||
126 | switch (tap_state.quote) { | ||
127 | case SINGLE_TAP: case DOUBLE_HOLD: register_code(KC_QUOT); break; | ||
128 | case SINGLE_HOLD: layer_on(_NAV); break; | ||
129 | } | ||
130 | } | ||
131 | |||
132 | void tap_dance_quote_reset(qk_tap_dance_state_t *state, void *user_data) { | ||
133 | switch (tap_state.quote) { | ||
134 | case SINGLE_TAP: case DOUBLE_HOLD: unregister_code(KC_QUOTE); break; | ||
135 | case DOUBLE_TAP: SEND_STRING("\""); break; | ||
136 | case TRIPLE_TAP: layer_invert(_NAV); break; | ||
137 | case SINGLE_HOLD: layer_off(_NAV); break; | ||
138 | } | ||
139 | tap_state.quote = 0; | ||
140 | } | ||
141 | |||
142 | qk_tap_dance_action_t tap_dance_actions[] = { | ||
143 | [TD_SEMICOLON] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_semicolon_finished, tap_dance_semicolon_reset), | ||
144 | [TD_GRAVE] = ACTION_TAP_DANCE_FN_ADVANCED(tap_dance_grave_each, tap_dance_grave_finished, NULL), | ||
145 | [TD_QUOTE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_quote_finished, tap_dance_quote_reset), | ||
146 | }; | ||
diff --git a/users/talljoe/tapdance/actions/td.function.c b/users/talljoe/tapdance/actions/td.function.c new file mode 100644 index 000000000..fffbf283d --- /dev/null +++ b/users/talljoe/tapdance/actions/td.function.c | |||
@@ -0,0 +1,35 @@ | |||
1 | /* Copyright 2020 Joseph Wasson | ||
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 | static struct { | ||
18 | int state; | ||
19 | } function_state = {0}; | ||
20 | |||
21 | // Send semi-colon + enter on two taps | ||
22 | void tap_dance_function_finished(qk_tap_dance_state_t *state, void *user_data) { | ||
23 | function_state.state = hold_cur_dance(state); | ||
24 | switch (function_state.state) { | ||
25 | case SINGLE_HOLD: layer_on(_ADJUST); break; | ||
26 | } | ||
27 | } | ||
28 | |||
29 | void tap_dance_function_reset(qk_tap_dance_state_t *state, void *user_data) { | ||
30 | switch (function_state.state) { | ||
31 | case SPECIAL: reset_keyboard(); break; | ||
32 | case SINGLE_HOLD: layer_off(_ADJUST); break; | ||
33 | } | ||
34 | function_state.state = 0; | ||
35 | } | ||
diff --git a/users/talljoe/tapdance/actions/td.grave.c b/users/talljoe/tapdance/actions/td.grave.c new file mode 100644 index 000000000..509b66dc3 --- /dev/null +++ b/users/talljoe/tapdance/actions/td.grave.c | |||
@@ -0,0 +1,36 @@ | |||
1 | /* Copyright 2020 Joseph Wasson | ||
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 | // Send `. ~. ``` | ||
18 | void tap_dance_grave_finished(qk_tap_dance_state_t *state, void *user_data) { | ||
19 | switch(state->count) { | ||
20 | case 1: | ||
21 | SEND_STRING("`"); | ||
22 | break; | ||
23 | case 2: | ||
24 | SEND_STRING("~"); | ||
25 | break; | ||
26 | } | ||
27 | } | ||
28 | |||
29 | void tap_dance_grave_each(qk_tap_dance_state_t *state, void *user_data) { | ||
30 | if(state->count == 3) { | ||
31 | SEND_STRING("```"); | ||
32 | } else if (state->count > 3) { | ||
33 | SEND_STRING("`"); | ||
34 | } | ||
35 | } | ||
36 | |||
diff --git a/users/talljoe/tapdance/actions/td.lock.c b/users/talljoe/tapdance/actions/td.lock.c new file mode 100644 index 000000000..4422d9e25 --- /dev/null +++ b/users/talljoe/tapdance/actions/td.lock.c | |||
@@ -0,0 +1,35 @@ | |||
1 | /* Copyright 2020 Joseph Wasson | ||
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 | static struct { | ||
18 | int state; | ||
19 | } lock_state = {0}; | ||
20 | |||
21 | // Send semi-colon + enter on two taps | ||
22 | void tap_dance_lock_finished(qk_tap_dance_state_t *state, void *user_data) { | ||
23 | lock_state.state = cur_dance(state); | ||
24 | switch (lock_state.state) { | ||
25 | case SINGLE_TAP: register_code(KC_ESC); break; | ||
26 | case SINGLE_HOLD: macro_lock(); break; | ||
27 | } | ||
28 | } | ||
29 | |||
30 | void tap_dance_lock_reset(qk_tap_dance_state_t *state, void *user_data) { | ||
31 | switch (lock_state.state) { | ||
32 | case SINGLE_TAP: unregister_code(KC_ESC); break; | ||
33 | } | ||
34 | lock_state.state = 0; | ||
35 | } | ||
diff --git a/users/talljoe/tapdance/actions/td.semicolon.c b/users/talljoe/tapdance/actions/td.semicolon.c new file mode 100644 index 000000000..45776492a --- /dev/null +++ b/users/talljoe/tapdance/actions/td.semicolon.c | |||
@@ -0,0 +1,54 @@ | |||
1 | /* Copyright 2020 Joseph Wasson | ||
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 | static struct { | ||
18 | int semicolon; | ||
19 | bool mods; | ||
20 | } tap_state = {0}; | ||
21 | |||
22 | void tap_dance_semicolon_each(qk_tap_dance_state_t *state, void *user_data) { | ||
23 | tap_state.mods |= get_mods(); | ||
24 | } | ||
25 | |||
26 | // Send semi-colon + enter on two taps | ||
27 | void tap_dance_semicolon_finished(qk_tap_dance_state_t *state, void *user_data) { | ||
28 | tap_state.semicolon = hold_cur_dance(state); | ||
29 | switch (tap_state.semicolon) { | ||
30 | case SINGLE_TAP: case DOUBLE_HOLD: register_code(KC_SCLN); break; | ||
31 | case SINGLE_HOLD: layer_on(_NUM); break; | ||
32 | } | ||
33 | } | ||
34 | |||
35 | void tap_dance_semicolon_reset(qk_tap_dance_state_t *state, void *user_data) { | ||
36 | switch (tap_state.semicolon) { | ||
37 | case SINGLE_TAP: case DOUBLE_HOLD: unregister_code(KC_SCLN); break; | ||
38 | case DOUBLE_TAP: { | ||
39 | if (tap_state.mods) { | ||
40 | SEND_STRING(";;"); // send normal when mods are pressed | ||
41 | } | ||
42 | else { | ||
43 | SEND_STRING(";\n"); | ||
44 | } | ||
45 | break; | ||
46 | } | ||
47 | case TRIPLE_TAP: { | ||
48 | SEND_STRING(";\n\n"); | ||
49 | } | ||
50 | case SPECIAL: layer_invert(_NUM); break; | ||
51 | case SINGLE_HOLD: layer_off(_NUM); break; | ||
52 | } | ||
53 | tap_state.semicolon = 0; | ||
54 | } | ||
diff --git a/users/talljoe/tapdance/tapdance.h b/users/talljoe/tapdance/tapdance.h new file mode 100644 index 000000000..532e978ca --- /dev/null +++ b/users/talljoe/tapdance/tapdance.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /* Copyright 2020 Joseph Wasson | ||
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 | #include "quantum.h" | ||
18 | #include "td_setup.h" | ||
19 | |||
20 | enum tap_dancers { | ||
21 | TD_SEMICOLON, | ||
22 | TD_GRAVE, | ||
23 | TD_LOCK, | ||
24 | TD_FUNCTION, | ||
25 | }; | ||
26 | |||
diff --git a/users/talljoe/tapdance/tapdance_actions.c b/users/talljoe/tapdance/tapdance_actions.c new file mode 100644 index 000000000..59a34b7b9 --- /dev/null +++ b/users/talljoe/tapdance/tapdance_actions.c | |||
@@ -0,0 +1,28 @@ | |||
1 | /* Copyright 2020 Joseph Wasson | ||
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 | #include "../talljoe.h" | ||
18 | #include "actions/td.grave.c" | ||
19 | #include "actions/td.lock.c" | ||
20 | #include "actions/td.semicolon.c" | ||
21 | #include "actions/td.function.c" | ||
22 | |||
23 | qk_tap_dance_action_t tap_dance_actions[] = { | ||
24 | [TD_SEMICOLON] = ACTION_TAP_DANCE_FN_ADVANCED(tap_dance_semicolon_each, tap_dance_semicolon_finished, tap_dance_semicolon_reset), | ||
25 | [TD_LOCK] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_lock_finished, tap_dance_lock_reset), | ||
26 | [TD_GRAVE] = ACTION_TAP_DANCE_FN_ADVANCED(tap_dance_grave_each, tap_dance_grave_finished, NULL), | ||
27 | [TD_FUNCTION] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_function_finished, tap_dance_function_reset), | ||
28 | }; | ||
diff --git a/users/talljoe/tapdance/td_setup.c b/users/talljoe/tapdance/td_setup.c new file mode 100644 index 000000000..d8464144a --- /dev/null +++ b/users/talljoe/tapdance/td_setup.c | |||
@@ -0,0 +1,70 @@ | |||
1 | /* Copyright 2020 Joseph Wasson | ||
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 | #include "tapdance.h" | ||
18 | |||
19 | int cur_dance (qk_tap_dance_state_t *state) { | ||
20 | if (state->count == 1) { | ||
21 | //If count = 1, and it has been interrupted - it doesn't matter if it is pressed or not: Send SINGLE_TAP | ||
22 | if (state->interrupted) { | ||
23 | // if (!state->pressed) return SINGLE_TAP; | ||
24 | //need "permissive hold" here. | ||
25 | // else return SINGLE_HOLD; | ||
26 | //If the interrupting key is released before the tap-dance key, then it is a single HOLD | ||
27 | //However, if the tap-dance key is released first, then it is a single TAP | ||
28 | //But how to get access to the state of the interrupting key???? | ||
29 | return SINGLE_TAP; | ||
30 | } | ||
31 | else { | ||
32 | if (!state->pressed) return SINGLE_TAP; | ||
33 | else return SINGLE_HOLD; | ||
34 | } | ||
35 | } | ||
36 | //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated | ||
37 | //with single tap. | ||
38 | else if (state->count == 2) { | ||
39 | if (state->interrupted) return DOUBLE_SINGLE_TAP; | ||
40 | else if (state->pressed) return DOUBLE_HOLD; | ||
41 | else return DOUBLE_TAP; | ||
42 | } | ||
43 | else if ((state->count == 3) && ((state->interrupted) || (!state->pressed))) return TRIPLE_TAP; | ||
44 | else if (state->count == 3) return TRIPLE_HOLD; | ||
45 | else return SPECIAL; | ||
46 | } | ||
47 | |||
48 | int hold_cur_dance (qk_tap_dance_state_t *state) { | ||
49 | if (state->count == 1) { | ||
50 | if (state->interrupted) { | ||
51 | if (!state->pressed) return SINGLE_TAP; | ||
52 | else return SINGLE_HOLD; | ||
53 | } | ||
54 | else { | ||
55 | if (!state->pressed) return SINGLE_TAP; | ||
56 | else return SINGLE_HOLD; | ||
57 | } | ||
58 | } | ||
59 | //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated | ||
60 | //with single tap. | ||
61 | else if (state->count == 2) { | ||
62 | if (state->pressed) return DOUBLE_HOLD; | ||
63 | else return DOUBLE_TAP; | ||
64 | } | ||
65 | else if (state->count == 3) { | ||
66 | if (!state->pressed) return TRIPLE_TAP; | ||
67 | else return TRIPLE_HOLD; | ||
68 | } | ||
69 | else return SPECIAL; | ||
70 | } | ||
diff --git a/users/talljoe/tapdance/td_setup.h b/users/talljoe/tapdance/td_setup.h new file mode 100644 index 000000000..85d45d944 --- /dev/null +++ b/users/talljoe/tapdance/td_setup.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* Copyright 2020 Joseph Wasson | ||
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 | enum { | ||
18 | SINGLE_TAP = 1, | ||
19 | SINGLE_HOLD = 2, | ||
20 | DOUBLE_TAP = 3, | ||
21 | DOUBLE_HOLD = 4, | ||
22 | DOUBLE_SINGLE_TAP = 5, //send two single taps | ||
23 | TRIPLE_TAP = 6, | ||
24 | TRIPLE_HOLD = 7, | ||
25 | SPECIAL = 8 | ||
26 | }; | ||
27 | |||
28 | int cur_dance (qk_tap_dance_state_t *state); | ||
29 | int hold_cur_dance (qk_tap_dance_state_t *state); | ||
diff --git a/users/talljoe/visualizer.c b/users/talljoe/visualizer.c new file mode 100644 index 000000000..c17b56706 --- /dev/null +++ b/users/talljoe/visualizer.c | |||
@@ -0,0 +1,21 @@ | |||
1 | /* Copyright 2020 Joseph Wasson | ||
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 | #include "talljoe.h" | ||
18 | |||
19 | static void get_visualizer_layer_and_color(visualizer_state_t* state) { | ||
20 | state->status_text = layer_names[biton32(state->status.layer)]; | ||
21 | } | ||