diff options
author | Yet Another Developer <50936645+yet-another-developer@users.noreply.github.com> | 2019-10-21 02:07:57 +0800 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-10-20 11:07:56 -0700 |
commit | 3d53ea439c277e49cd4149a6caea727304f41ace (patch) | |
tree | 1d782a97be651ff911342cbec19cdb18ceeeda62 | |
parent | f64d9b06215bb08d7f77aeba126c0804fffd0064 (diff) | |
download | qmk_firmware-3d53ea439c277e49cd4149a6caea727304f41ace.tar.gz qmk_firmware-3d53ea439c277e49cd4149a6caea727304f41ace.zip |
[Keymap] Ergodash keymap for yet-another-developer (#7046)
* Initialize ergodash rev 1 keymap
./util/new_keymap.sh ergodash/rev1 yet-another-developer
* Add user space configurations referenced from drashna
* Start community layout for ergodash in ortho_5x14
* Remove unused layers
* Add userspace layers
* Add Userspace gitignore
Hide Secrets
* Remove userspace unused drashna features
* Scrap default keymap and follow drashna's template
* Add code referenced from kuchosauronad0
* Make sure that the author is named Developer
* Replace middle keys del and bksp with curly brace
* Reduce ONESHOT_TIMEOUT from 3sec to 2sec
* Remove adjust key AG_SWAP
* Disable UNICODEMAP_ENABLE, remove code causing build fail
* Increase TAPPING_TERM to 240
Reason: Because Space is also LOWER, space sometimes not registering.
PS: I dont want to #define RETRO_TAPPING yet
* Update KC_MAKE to use :flash
* Remove TAP_ONCE, use tap_code
Signed-off-by: Developer <anotherdeveloper@icloud.com>
* Remove redundant code implementation of keyboard_post_init_user
https://github.com/qmk/qmk_firmware/pull/7046
users/yet-another-developer/leader.c
```
static bool has_ran_yet;
if (!has_ran_yet) {
has_ran_yet = true;
startup_user();
```
Comment for lines +11 – +14
@drashna: Not needed anymore. You can use keyboard_post_init_user now.
Signed-off-by: Developer <anotherdeveloper@icloud.com>
23 files changed, 1618 insertions, 0 deletions
diff --git a/keyboards/ergodash/rev1/keymaps/yet-another-developer/config.h b/keyboards/ergodash/rev1/keymaps/yet-another-developer/config.h new file mode 100644 index 000000000..1005c4804 --- /dev/null +++ b/keyboards/ergodash/rev1/keymaps/yet-another-developer/config.h | |||
@@ -0,0 +1,67 @@ | |||
1 | /* | ||
2 | This is the c configuration file for the keymap | ||
3 | |||
4 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
5 | Copyright 2015 Jack Humbert | ||
6 | |||
7 | This program is free software: you can redistribute it and/or modify | ||
8 | it under the terms of the GNU General Public License as published by | ||
9 | the Free Software Foundation, either version 2 of the License, or | ||
10 | (at your option) any later version. | ||
11 | |||
12 | This program is distributed in the hope that it will be useful, | ||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | GNU General Public License for more details. | ||
16 | |||
17 | You should have received a copy of the GNU General Public License | ||
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | */ | ||
20 | |||
21 | #pragma once | ||
22 | |||
23 | |||
24 | /* Use I2C or Serial, not both */ | ||
25 | #define USE_SERIAL | ||
26 | // #define USE_I2C | ||
27 | |||
28 | /* Select hand configuration */ | ||
29 | |||
30 | //#define MASTER_LEFT | ||
31 | #define MASTER_RIGHT /* Cable connected to the right split keyboard */ | ||
32 | // #define EE_HANDS | ||
33 | |||
34 | #define AUTO_SHIFT_TIMEOUT 210 | ||
35 | |||
36 | #define TAPPING_TERM_PER_KEY | ||
37 | |||
38 | // https://beta.docs.qmk.fm/features/feature_leader_key | ||
39 | //#define LEADER_PER_KEY_TIMING | ||
40 | //#define LEADER_TIMEOUT 280 | ||
41 | |||
42 | // https://docs.qmk.fm/#/feature_mouse_keys | ||
43 | #define MK_3_SPEED // Constant Speed Mode | ||
44 | |||
45 | #define MOUSEKEY_DELAY 300 | ||
46 | #define MOUSEKEY_INTERVAL 16 | ||
47 | #define MOUSEKEY_MAX_SPEED 3 | ||
48 | #define MOUSEKEY_TIME_TO_MAX 60 | ||
49 | #define MK_C_OFFSET_0 4 | ||
50 | #define MK_C_INTERVAL_0 28 | ||
51 | #define MK_C_OFFSET_1 8 | ||
52 | #define MK_C_INTERVAL_1 16 | ||
53 | #define MK_C_OFFSET_2 20 | ||
54 | #define MK_C_INTERVAL_2 16 | ||
55 | |||
56 | #define MOUSEKEY_WHEEL_MAX_SPEED 4 | ||
57 | #define MOUSEKEY_WHEEL_TIME_TO_MAX 40 | ||
58 | |||
59 | #define MK_W_OFFSET_0 1 | ||
60 | #define MK_W_INTERVAL_0 120 | ||
61 | #define MK_W_OFFSET_1 1 | ||
62 | #define MK_W_INTERVAL_1 100 | ||
63 | #define MK_W_OFFSET_2 1 | ||
64 | #define MK_W_INTERVAL_2 60 | ||
65 | |||
66 | //#define STARTUP_RESET_EEPROM // EMERGENCY | ||
67 | |||
diff --git a/keyboards/ergodash/rev1/keymaps/yet-another-developer/keymap.c b/keyboards/ergodash/rev1/keymaps/yet-another-developer/keymap.c new file mode 100644 index 000000000..1d51227cc --- /dev/null +++ b/keyboards/ergodash/rev1/keymaps/yet-another-developer/keymap.c | |||
@@ -0,0 +1,157 @@ | |||
1 | #include QMK_KEYBOARD_H | ||
2 | #include "yet-another-developer.h" | ||
3 | |||
4 | #ifndef UNICODE_ENABLE | ||
5 | # define UC(x) KC_NO | ||
6 | #endif | ||
7 | |||
8 | extern keymap_config_t keymap_config; | ||
9 | |||
10 | #define EISU LALT(KC_GRV) | ||
11 | |||
12 | #define LAYOUT_ergodash_pretty_wrapper(...) LAYOUT_ergodash_pretty(__VA_ARGS__) | ||
13 | |||
14 | /* Keymap: BASE layer | ||
15 | * | ||
16 | * ,----------------------------------------------------. ,----------------------------------------------------. | ||
17 | * | ESC | 1 | 2 | 3 | 4 | 5 | [ | | ] | 6 | 7 | 8 | 9 | 0 | Pscree | | ||
18 | * |--------+--------+------+------+------+-------------| |------+------+------+------+------+--------+--------| | ||
19 | * | ` | K01 | K02 | K03 | K04 | K05 | - | | = | K06 | K07 | K08 | K09 | K0A | \ | | ||
20 | * |--------+--------+------+------+------+------|------| |------|------+------+------+------+--------+--------| | ||
21 | * | Tab | K11 | K12 | K13 | K14 | K15 | { | | } | K16 | K17 | K18 | K19 | K1A | " | | ||
22 | * |--------+--------+------+------+------+------|------' `------|------+------+------+------+--------+--------| | ||
23 | * | LShift | K21 | K22 | K23 | K24 | K25 | | K26 | K27 | K28 | K29 | K2A | RShift | | ||
24 | * |--------+--------+------+------+------+------' `------+------+------+------+--------+--------| | ||
25 | * | LCtrl | GUI | Alt | Alt | | LEFT | DOWN | UP | RIGHT | | ||
26 | * `-------------------------------' `-------------------------------' | ||
27 | * ,--------------. ,--------------. | ||
28 | * | Lower| | | | Raise | | ||
29 | * ,-------| / | Del | | Bksp + / +-------. | ||
30 | * |CMD/Spc| Space| | | | Enter |CMD/Spc| | ||
31 | * `----------------------' `----------------------' | ||
32 | */ | ||
33 | #define LAYOUT_ergodash_pretty_base( \ | ||
34 | K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ | ||
35 | K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ | ||
36 | K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ | ||
37 | ) \ | ||
38 | LAYOUT_ergodash_pretty_wrapper( \ | ||
39 | KC_ESC, ________________NUMBER_LEFT________________, KC_LBRC, KC_RBRC, ________________NUMBER_RIGHT_______________, KC_PSCR, \ | ||
40 | KC_GRV, K01, K02, K03, K04, K05, KC_MINS, KC_EQL, K06, K07, K08, K09, K0A, KC_BSLS, \ | ||
41 | KC_TAB, K11, K12, K13, K14, K15, KC_LCBR, KC_RCBR, K16, K17, K18, K19, K1A, KC_QUOT, \ | ||
42 | OS_LSFT, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, OS_RSFT, \ | ||
43 | KC_LCTL, KC_LGUI, KC_LALT, KC_LALT, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, \ | ||
44 | LT(_LOWER, KC_SPC), LT(_RAISE, KC_ENT), \ | ||
45 | OS_LGUI,LT(_LOWER, KC_SPC),KC_DEL, KC_BSPC, LT(_RAISE, KC_ENT), OS_RGUI \ | ||
46 | ) | ||
47 | |||
48 | #define LAYOUT_ergodash_pretty_base_wrapper(...) LAYOUT_ergodash_pretty_base(__VA_ARGS__) | ||
49 | |||
50 | |||
51 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
52 | |||
53 | [_QWERTY] = LAYOUT_ergodash_pretty_base_wrapper( | ||
54 | _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, | ||
55 | _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, | ||
56 | _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ | ||
57 | ), | ||
58 | |||
59 | /* Keymap: COLEMAK layer | ||
60 | * | ||
61 | * ,----------------------------------------------------. ,----------------------------------------------------. | ||
62 | * | ESC | 1 | 2 | 3 | 4 | 5 | [ | | ] | 6 | 7 | 8 | 9 | 0 | - | | ||
63 | * |--------+--------+------+------+------+-------------| |------+------+------+------+------+--------+--------| | ||
64 | * | ` | Q | W | F | P | G | - | | = | J | L | U | Y | ; | \ | | ||
65 | * |--------+--------+------+------+------+------|------| |------|------+------+------+------+--------+--------| | ||
66 | * | Tab | A | R | S | T | D | Del | | Bksp | H | N | E | I | O | ' | | ||
67 | * |--------+--------+------+------+------+------|------' `------|------+------+------+------+--------+--------| | ||
68 | * | LShift | Z | X | C | V | B | | K | M | , < | . > | / | RShift | | ||
69 | * |--------+--------+------+------+------+------' `------+------+------+------+--------+--------| | ||
70 | * | Ctrl | GUI | Alt | EISU | | LEFT | DOWN | UP | RIGHT | | ||
71 | * `-------------------------------' `-------------------------------' | ||
72 | * ,--------------. ,--------------. | ||
73 | * | Lower| | | | Raise | | ||
74 | * ,-------| / | Del | | Bksp + / +-------. | ||
75 | * |CMD/Spc| Space| | | | Enter |CMD/Spc| | ||
76 | * `----------------------' `----------------------' | ||
77 | */ | ||
78 | |||
79 | |||
80 | // If it accepts an argument (i.e, is a function), it doesn't need KC_. | ||
81 | // Otherwise, it needs KC_* | ||
82 | [_COLEMAK] = LAYOUT_ergodash_pretty_base_wrapper( | ||
83 | _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, | ||
84 | _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, | ||
85 | _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ | ||
86 | ), | ||
87 | |||
88 | [_DVORAK] = LAYOUT_ergodash_pretty_base_wrapper( | ||
89 | _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, | ||
90 | _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, | ||
91 | _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ | ||
92 | ), | ||
93 | |||
94 | [_WORKMAN] = LAYOUT_ergodash_pretty_base_wrapper( | ||
95 | _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, | ||
96 | _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, | ||
97 | _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ | ||
98 | ), | ||
99 | |||
100 | #ifdef UNICODEMAP_ENABLE | ||
101 | [_UNICODE] = LAYOUT_ergodash_pretty_base_wrapper( | ||
102 | _______________UNICODE_L1__________________, _______________UNICODE_R1__________________, | ||
103 | _______________UNICODE_L2__________________, _______________UNICODE_R2__________________, | ||
104 | _______________UNICODE_L3__________________, _______________UNICODE_R3__________________ | ||
105 | ), | ||
106 | #endif | ||
107 | |||
108 | [_LOWER] = LAYOUT_ergodash_pretty_wrapper( | ||
109 | KC_F11, _________________FUNC_LEFT_________________, KC_RST , KC_RST , _________________FUNC_RIGHT________________, KC_F12, | ||
110 | KC_TILD, _________________LOWER_L1__________________, _______, _______, _________________LOWER_R1__________________, KC_PIPE, | ||
111 | _______, _________________LOWER_L2__________________, _______, _______, _________________LOWER_R2__________________, KC_DQUO, | ||
112 | _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, KC_PSCR, | ||
113 | _______, _______, _______, _______, _______, _______, _______, KC_PAUS, | ||
114 | _______, _______, | ||
115 | _______, _______, _______, _______, _______, _______ | ||
116 | ), | ||
117 | |||
118 | [_RAISE] = LAYOUT_ergodash_pretty_wrapper( | ||
119 | KC_F12, _________________FUNC_LEFT_________________, KC_RST, KC_RST , _________________FUNC_RIGHT________________, KC_F11, | ||
120 | KC_GRV, _________________RAISE_L1__________________, _______, _______, _________________RAISE_R1__________________, KC_BSLS, | ||
121 | _______, _________________RAISE_L2__________________, _______, _______, _________________RAISE_R2__________________, KC_QUOT, | ||
122 | _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, KC_PSCR, | ||
123 | _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, | ||
124 | _______, _______, | ||
125 | _______, _______, _______, _______, _______, _______ | ||
126 | ), | ||
127 | |||
128 | [_ADJUST] = LAYOUT_ergodash_pretty_wrapper( | ||
129 | KC_MAKE, _______, _______, _______, _______, _______, _______, KC_NUKE, _______, _______, _______, _______, _______, KC_RST, | ||
130 | VRSN, _________________ADJUST_L1_________________, _______, _______, _________________ADJUST_R1_________________, EEP_RST, | ||
131 | _______, _________________ADJUST_L2_________________, _______, _______, _________________ADJUST_R2_________________, _______, | ||
132 | _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, _______, | ||
133 | _______, _______, _______, _______, _______, _______, _______, _______, | ||
134 | _______, _______, | ||
135 | _______, _______, _______, _______, _______, _______ | ||
136 | ), | ||
137 | }; | ||
138 | |||
139 | #ifdef AUDIO_ENABLE | ||
140 | float tone_qwerty[][2] = SONG(QWERTY_SOUND); | ||
141 | #endif | ||
142 | |||
143 | void persistent_default_layer_set(uint16_t default_layer) { | ||
144 | eeconfig_update_default_layer(default_layer); | ||
145 | default_layer_set(default_layer); | ||
146 | } | ||
147 | |||
148 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | ||
149 | return true; | ||
150 | } | ||
151 | void matrix_init_keymap(void) { | ||
152 | #ifdef STARTUP_RESET_EEPROM | ||
153 | eeconfig_init(); | ||
154 | #endif | ||
155 | } | ||
156 | |||
157 | // | ||
diff --git a/keyboards/ergodash/rev1/keymaps/yet-another-developer/rules.mk b/keyboards/ergodash/rev1/keymaps/yet-another-developer/rules.mk new file mode 100644 index 000000000..6ba6c5b22 --- /dev/null +++ b/keyboards/ergodash/rev1/keymaps/yet-another-developer/rules.mk | |||
@@ -0,0 +1,23 @@ | |||
1 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
2 | |||
3 | # Device | ||
4 | AUDIO_ENABLE = no | ||
5 | |||
6 | RGBLIGHT_ENABLE = no | ||
7 | BACKLIGHT_ENABLE = no | ||
8 | INDICATOR_LIGHTS = no | ||
9 | |||
10 | # QMK Features | ||
11 | AUTO_SHIFT_ENABLE = no | ||
12 | MOUSEKEY_ENABLE = no | ||
13 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
15 | LEADER_ENABLE = yes # default is yes | ||
16 | TAP_DANCE_ENABLE = no #(+1254) | ||
17 | UNICODE_ENABLE = no #(+1134) | ||
18 | UNICODEMAP_ENABLE = no | ||
19 | NKRO_ENABLE = no | ||
20 | MACROS_ENABLED = no | ||
21 | |||
22 | # User Defined Features | ||
23 | NO_SECRETS = no | ||
diff --git a/layouts/community/ortho_5x14/yet-another-developer/config.h b/layouts/community/ortho_5x14/yet-another-developer/config.h new file mode 100644 index 000000000..7504338ff --- /dev/null +++ b/layouts/community/ortho_5x14/yet-another-developer/config.h | |||
@@ -0,0 +1,22 @@ | |||
1 | #pragma once | ||
2 | |||
3 | /* ws2812 RGB LED */ | ||
4 | #if defined(KEYBOARD_fractal) | ||
5 | # define RGB_DI_PIN D2 | ||
6 | # undef RGBLED_NUM | ||
7 | # define RGBLIGHT_ANIMATIONS | ||
8 | # define RGBLED_NUM 29 // Number of LEDs | ||
9 | # undef RGBLIGHT_HUE_STEP | ||
10 | # define RGBLIGHT_HUE_STEP 8 | ||
11 | # undef RGBLIGHT_SAT_STEP | ||
12 | # define RGBLIGHT_SAT_STEP 8 | ||
13 | # undef RGBLIGHT_VAL_STEP | ||
14 | # define RGBLIGHT_VAL_STEP 8 | ||
15 | # define RGBLIGHT_LIMIT_VAL 175 | ||
16 | # define RGBLIGHT_SLEEP | ||
17 | |||
18 | # define RGBLIGHT_EFFECT_KNIGHT_OFFSET 3 | ||
19 | # define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 14 | ||
20 | # define B7_AUDIO | ||
21 | # define NO_MUSIC_MODE | ||
22 | #endif | ||
diff --git a/layouts/community/ortho_5x14/yet-another-developer/keymap.c b/layouts/community/ortho_5x14/yet-another-developer/keymap.c new file mode 100644 index 000000000..aea50508d --- /dev/null +++ b/layouts/community/ortho_5x14/yet-another-developer/keymap.c | |||
@@ -0,0 +1,208 @@ | |||
1 | #include QMK_KEYBOARD_H | ||
2 | #include "yet-another-developer.h" | ||
3 | |||
4 | // clang-format off | ||
5 | |||
6 | /* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */ | ||
7 | #define LAYOUT_ergodash_pretty( \ | ||
8 | L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ | ||
9 | L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ | ||
10 | L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ | ||
11 | L30, L31, L32, L33, L34, L35, R31, R32, R33, R34, R35, R36, \ | ||
12 | L40, L41, L42, L43, R43, R44, R45, R46 \ | ||
13 | L36, R30, \ | ||
14 | L44, L45, L46, R40, R41, R42, \ | ||
15 | ) \ | ||
16 | /* matrix positions */ \ | ||
17 | { \ | ||
18 | { L00, L01, L02, L03, L04, L05, L06 }, \ | ||
19 | { L10, L11, L12, L13, L14, L15, L16 }, \ | ||
20 | { L20, L21, L22, L23, L24, L25, L26 }, \ | ||
21 | { L30, L31, L32, L33, L34, L35, L36 }, \ | ||
22 | { L40, L41, L42, L43, L44, L45, L46 }, \ | ||
23 | { R06, R05, R04, R03, R02, R01, R00 }, \ | ||
24 | { R16, R15, R14, R13, R12, R11, R10 }, \ | ||
25 | { R26, R25, R24, R23, R22, R21, R20 }, \ | ||
26 | { R36, R35, R34, R33, R32, R31, R30 }, \ | ||
27 | { R46, R45, R44, R43, R42, R41, R40 } \ | ||
28 | } | ||
29 | |||
30 | #define LAYOUT_ergodash_pretty_wrapper(...) LAYOUT_ergodash_pretty(__VA_ARGS__) | ||
31 | |||
32 | #define LAYOUT_ergodash_pretty_base( \ | ||
33 | K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ | ||
34 | K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ | ||
35 | K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ | ||
36 | ) \ | ||
37 | LAYOUT_ergodox_pretty_wrapper( \ | ||
38 | KC_ESC, ________________NUMBER_LEFT________________, KC_LBRC, KC_RBRC, ________________NUMBER_RIGHT_______________, KC_PSCR, \ | ||
39 | KC_GRV, K01, K02, K03, K04, K05, KC_MINS, KC_EQL, K06, K07, K08, K09, K0A, KC_BSLS, \ | ||
40 | KC_TAB, ALT_T(K11), K12, K13, K14, K15, KC_DEL, KC_BSPC, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ | ||
41 | KC_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF, \ | ||
42 | KC_LCTL, KC_LGUI, KC_LALT, EISU, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ | ||
43 | LT(_LOWER, KC_SPC), LT(_RAISE, KC_ENT), \ | ||
44 | OS_LGUI,LT(_LOWER, KC_SPC),KC_DEL, KC_BSPC, LT(_RAISE, KC_ENT), OS_RGUI \ | ||
45 | ) | ||
46 | |||
47 | #define LAYOUT_ergodash_pretty_base_wrapper(...) LAYOUT_ergodash_pretty_base(__VA_ARGS__) | ||
48 | |||
49 | |||
50 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
51 | /* Keymap 0: QWERTY Layer | ||
52 | * | ||
53 | * | ||
54 | * ,--------------------------------------------------. ,--------------------------------------------------. | ||
55 | * | = + | 1 ! | 2 @ | 3 # | 4 $ | 5 % | TG(4)| | TG(4)| 6 ^ | 7 & | 8 * | 9 ( | 0 ) | - _ | | ||
56 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| | ||
57 | * | TAB | Q | W | E | R | T | TG(3)| |TG(3) | Y | U | I | O | P | \ | | | ||
58 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | ||
59 | * | Bksp | A | S | D | F | G |------| |------| H | J | K | L | ; | ' " | | ||
60 | * |--------+------+------+------+------+------| TG(2)| | TG(2)|------+------+------+------+------+--------| | ||
61 | * | Shift | Z | X | C | V | B | | | | N | M | , < | . > | ? / | Shift | | ||
62 | * |--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------| | ||
63 | * | `/SYM | MEH | LGUI | [ { | | LEFT | DOWN | UP |RIGHT | SYMB | | ||
64 | * `-----------------------------' `------------------------------------' | ||
65 | * ,--------------. ,--------------. | ||
66 | * |Alt/Ap| Win | | Alt |Ctl/Esc| | ||
67 | * ,------|------|-------| |------+-------+------. | ||
68 | * | | | Home | | PgUp | | | | ||
69 | * `---------------------' `---------------------' | ||
70 | */ | ||
71 | [_QWERTY] = LAYOUT_ergodash_pretty_base_wrapper( | ||
72 | _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, | ||
73 | _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, | ||
74 | _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ | ||
75 | ), | ||
76 | /* Keymap 0: COLEMAK layer | ||
77 | * | ||
78 | * ,--------------------------------------------------. ,--------------------------------------------------. | ||
79 | * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | | ||
80 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| | ||
81 | * | Del | Q | W | F | P | G | L1 | | L1 | J | L | U | Y | ; | \ | | ||
82 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | ||
83 | * | BkSp | A | R | S | T | D |------| |------| H | N | E | I |O / L2| ' | | ||
84 | * |--------+------+------+------+------+------| OVER | | Meh |------+------+------+------+------+--------| | ||
85 | * | LShift |Z/Ctrl| X | C | V | B | | | | K | M | , | . |//Ctrl| RShift | | ||
86 | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' | ||
87 | * | `/SYM | MEH | LGUI | [ { | | LEFT | DOWN | UP |RIGHT | SYMB | | ||
88 | * `-----------------------------' `------------------------------------' | ||
89 | * ,--------------. ,--------------. | ||
90 | * |Alt/Ap| Win | | Alt |Ctl/Esc| | ||
91 | * ,------|------|-------| |------+-------+------. | ||
92 | * | | | Home | | PgUp | | | | ||
93 | * `---------------------' `---------------------' | ||
94 | */ | ||
95 | // If it accepts an argument (i.e, is a function), it doesn't need KC_. | ||
96 | // Otherwise, it needs KC_* | ||
97 | [_COLEMAK] = LAYOUT_ergodash_pretty_base_wrapper( | ||
98 | _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, | ||
99 | _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, | ||
100 | _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ | ||
101 | ), | ||
102 | |||
103 | // Reverts OSM(Shift) to normal Shifts. However, may not need since we fixed the issue with RDP (LOCAL RESOURCES) | ||
104 | [_MODS] = LAYOUT_ergodash_pretty_wrapper( | ||
105 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
106 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
107 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
108 | KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, | ||
109 | _______, _______, _______, _______, _______, _______, _______, _______, | ||
110 | _______, _______, _______, _______, | ||
111 | _______, _______, _______, _______, _______, _______ | ||
112 | ), | ||
113 | |||
114 | |||
115 | /* Keymap 4: Customized Overwatch Layout | ||
116 | * | ||
117 | * ,--------------------------------------------------. ,--------------------------------------------------. | ||
118 | * | ESC | | | | | | | | | F9 | F10 | F11 | F12 | | | | ||
119 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| | ||
120 | * | F1 | K | Q | W | E | R | T | | | | | | | | | | ||
121 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | ||
122 | * | TAB | G | A | S | D | F |------| |------| | | | | | | | ||
123 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | ||
124 | * | LCTR | LSHFT| Z | X | C | V | | | | N | M | | | | | | ||
125 | * |--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------| | ||
126 | * | `/SYM | MEH | LGUI | [ { | | LEFT | DOWN | UP |RIGHT | SYMB | | ||
127 | * `-----------------------------' `------------------------------------' | ||
128 | * ,--------------. ,--------------. | ||
129 | * |Alt/Ap| Win | | Alt |Ctl/Esc| | ||
130 | * ,------|------|-------| |------+-------+------. | ||
131 | * | | | Home | | PgUp | | | | ||
132 | * `---------------------' `---------------------' | ||
133 | */ | ||
134 | [_GAMEPAD] = LAYOUT_ergodash_pretty_wrapper( | ||
135 | KC_ESC, KC_NO, KC_1, KC_2, KC_3, HYPR(KC_Q), HYPR(KC_GRV), KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, | ||
136 | KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T, UC_SHRG, UC_DISA, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, | ||
137 | KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, KC_I, KC_O, KC_NO, KC_NO, KC_NO, KC_NO, | ||
138 | KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_TRNS, TG(_GAMEPAD), KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, | ||
139 | KC_GRV, KC_U, KC_I, KC_Y, KC_T, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, | ||
140 | KC_O, KC_P, MAGIC_TOGGLE_NKRO, LALT(KC_PSCR), | ||
141 | KC_LGUI, KC_HYPR, | ||
142 | KC_V, KC_SPC, KC_H, KC_NO, KC_NO, KC_SWAP_NUM | ||
143 | ), | ||
144 | |||
145 | /* Keymap 3: | ||
146 | * | ||
147 | * ,--------------------------------------------------. ,--------------------------------------------------. | ||
148 | * | ESC | V | D | ALT | | | | | | | | | | | | | ||
149 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| | ||
150 | * | TAB | S | I | F | M | T | | | | | | | | | | | ||
151 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | ||
152 | * | Q | 1 | 2 | 3 | 4 | G |------| |------| | | | | | | | ||
153 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | ||
154 | * | NUMLOCK| NUM1 | NUM2 | NUM3 | NUM4 | Z | | | | | | | | | | | ||
155 | * |--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' | ||
156 | * | `/SYM | MEH | LGUI | [ { | | LEFT | DOWN | UP |RIGHT | SYMB | | ||
157 | * `-----------------------------' `------------------------------------' | ||
158 | * ,--------------. ,--------------. | ||
159 | * |Alt/Ap| Win | | Alt |Ctl/Esc| | ||
160 | * ,------|------|-------| |------+-------+------. | ||
161 | * | | | Home | | PgUp | | | | ||
162 | * `---------------------' `---------------------' | ||
163 | */ | ||
164 | [_DIABLO] = LAYOUT_ergodash_pretty_wrapper( | ||
165 | KC_ESC, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, | ||
166 | KC_TAB, KC_S, KC_I, KC_F, KC_M, KC_T, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, | ||
167 | KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, | ||
168 | KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, KC_NO, KC_NO, KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, | ||
169 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, | ||
170 | KC_L, KC_J, KC_NO, KC_NO, | ||
171 | KC_F, KC_NO, | ||
172 | SFT_T(KC_SPACE), ALT_T(KC_Q), KC_DIABLO_CLEAR, KC_PGDN, KC_DEL, KC_ENT | ||
173 | ), | ||
174 | |||
175 | [_LOWER] = LAYOUT_ergodash_pretty_wrapper( | ||
176 | KC_F12, _________________FUNC_LEFT_________________, _______, _______, _________________FUNC_RIGHT________________, KC_F11, | ||
177 | KC_TILD, _________________LOWER_L1__________________, _______, _______, _________________LOWER_R1__________________, KC_PIPE, | ||
178 | _______, ___________________BLANK___________________, _________________LOWER_R2__________________, KC_DQUO, | ||
179 | _______, ___________________BLANK___________________, _______, _______, _________________LOWER_R3__________________, KC_PSCR, | ||
180 | _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, | ||
181 | _______, _______, _______, _______, | ||
182 | _______, _______, | ||
183 | _______, _______, _______, _______, _______, _______ | ||
184 | ), | ||
185 | |||
186 | [_RAISE] = LAYOUT_ergodash_pretty_wrapper( | ||
187 | KC_F12, _________________FUNC_LEFT_________________, _______, _______, _________________FUNC_RIGHT________________, KC_F11, | ||
188 | KC_GRV, _________________RAISE_L1__________________, _______, _______, _________________RAISE_R1__________________, KC_BSLS, | ||
189 | _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_QUOT, | ||
190 | _______, _________________RAISE_L3__________________, _______, _______, _________________RAISE_R3__________________, KC_PSCR, | ||
191 | _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_SLCK, | ||
192 | _______, _______, _______, _______, | ||
193 | _______, _______, _______, _______, _______, _______ | ||
194 | ), | ||
195 | |||
196 | [_ADJUST] = LAYOUT_ergodash_pretty_wrapper( | ||
197 | KC_MAKE, _______, _______, _______, _______, _______, _______, KC_NUKE, _________________ADJUST_R1_________________, KC_RST, | ||
198 | VRSN, _________________ADJUST_L1_________________, _______, _______, _______, _______, _______, _______, _______, EEP_RST, | ||
199 | _______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, RGB_IDL, | ||
200 | _______, _________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, TG(_MODS), | ||
201 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
202 | _______, _______, _______, _______, | ||
203 | _______, _______, | ||
204 | _______, _______, _______, _______, _______, _______ | ||
205 | ), | ||
206 | |||
207 | }; | ||
208 | // clang-format on | ||
diff --git a/layouts/community/ortho_5x14/yet-another-developer/rules.mk b/layouts/community/ortho_5x14/yet-another-developer/rules.mk new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/layouts/community/ortho_5x14/yet-another-developer/rules.mk | |||
@@ -0,0 +1 @@ | |||
diff --git a/users/yet-another-developer/.gitignore b/users/yet-another-developer/.gitignore new file mode 100644 index 000000000..d81556914 --- /dev/null +++ b/users/yet-another-developer/.gitignore | |||
@@ -0,0 +1,2 @@ | |||
1 | secrets.c | ||
2 | secrets.h \ No newline at end of file | ||
diff --git a/users/yet-another-developer/README.md b/users/yet-another-developer/README.md new file mode 100644 index 000000000..3e528bcf5 --- /dev/null +++ b/users/yet-another-developer/README.md | |||
@@ -0,0 +1,7 @@ | |||
1 | # User Space for yet-another-developer | ||
2 | |||
3 | |||
4 | ## Reference / Inspiration | ||
5 | - /u/kuchosauronad0 | ||
6 | - /u/drashna | ||
7 | - /u/not-quite-neo \ No newline at end of file | ||
diff --git a/users/yet-another-developer/combo.c b/users/yet-another-developer/combo.c new file mode 100644 index 000000000..b4e8e84ae --- /dev/null +++ b/users/yet-another-developer/combo.c | |||
@@ -0,0 +1,27 @@ | |||
1 | #include "combo.h" | ||
2 | |||
3 | void process_combo_event(uint8_t combo_index, bool pressed){ | ||
4 | switch(combo_index) { | ||
5 | case ZV_COPY: | ||
6 | if (pressed) { | ||
7 | tap_code16(LCTL(KC_C)); | ||
8 | } | ||
9 | break; | ||
10 | case XV_CUT: | ||
11 | if (pressed) { | ||
12 | tap_code16(LCTL(KC_X)); | ||
13 | } | ||
14 | break; | ||
15 | |||
16 | case CV_PASTE: | ||
17 | if (pressed) { | ||
18 | tap_code16(LCTL(KC_V)); | ||
19 | } | ||
20 | break; | ||
21 | case QP_SLEEP: | ||
22 | if (pressed) { | ||
23 | tap_code16(KC_SYSTEM_SLEEP); | ||
24 | } | ||
25 | break; | ||
26 | } | ||
27 | } | ||
diff --git a/users/yet-another-developer/combo.h b/users/yet-another-developer/combo.h new file mode 100644 index 000000000..e2ff09ab5 --- /dev/null +++ b/users/yet-another-developer/combo.h | |||
@@ -0,0 +1,21 @@ | |||
1 | #pragma once | ||
2 | #include "quantum.h" | ||
3 | enum combo_events { | ||
4 | ZV_COPY, | ||
5 | XV_CUT, | ||
6 | CV_PASTE, | ||
7 | QP_SLEEP | ||
8 | }; | ||
9 | |||
10 | const uint16_t PROGMEM copy_combo[] = {KC_Z, KC_V, COMBO_END}; | ||
11 | const uint16_t PROGMEM cut_combo[] = {KC_X, KC_V, COMBO_END}; | ||
12 | const uint16_t PROGMEM paste_combo[] = {KC_C, KC_V, COMBO_END}; | ||
13 | const uint16_t PROGMEM sleep_combo[] = {KC_Q, KC_P, COMBO_END}; | ||
14 | |||
15 | combo_t key_combos[COMBO_COUNT] = { | ||
16 | [ZV_COPY] = COMBO_ACTION(copy_combo), | ||
17 | [XV_CUT] = COMBO_ACTION(cut_combo), | ||
18 | [CV_PASTE] = COMBO_ACTION(paste_combo), | ||
19 | [QP_SLEEP] = COMBO_ACTION(sleep_combo), | ||
20 | }; | ||
21 | |||
diff --git a/users/yet-another-developer/config.h b/users/yet-another-developer/config.h new file mode 100644 index 000000000..d46d487fe --- /dev/null +++ b/users/yet-another-developer/config.h | |||
@@ -0,0 +1,56 @@ | |||
1 | #pragma once | ||
2 | |||
3 | /* Set Polling rate to 1000Hz */ | ||
4 | #define USB_POLLING_INTERVAL_MS 1 | ||
5 | |||
6 | #ifndef ONESHOT_TAP_TOGGLE | ||
7 | #define ONESHOT_TAP_TOGGLE 2 | ||
8 | #endif // !ONESHOT_TAP_TOGGLE | ||
9 | |||
10 | #ifndef ONESHOT_TIMEOUT | ||
11 | #define ONESHOT_TIMEOUT 2000 | ||
12 | #endif // !ONESHOT_TIMEOUT | ||
13 | |||
14 | #ifndef QMK_KEYS_PER_SCAN | ||
15 | #define QMK_KEYS_PER_SCAN 4 | ||
16 | #endif // !QMK_KEYS_PER_SCAN | ||
17 | |||
18 | #if defined(LEADER_ENABLE) | ||
19 | #define LEADER_PER_KEY_TIMING | ||
20 | #define LEADER_TIMEOUT 250 | ||
21 | #endif // !LEADER_ENABLE | ||
22 | |||
23 | #if defined(COMBO_ENABLE) | ||
24 | #define COMBO_COUNT 4 | ||
25 | #define COMBO_TERM 150 | ||
26 | #endif // !COMBO_ENABLE | ||
27 | |||
28 | #if defined(NKRO_ENABLE) | ||
29 | #define FORCE_NKRO | ||
30 | #endif // !NKRO_ENABLE | ||
31 | |||
32 | // this makes it possible to do rolling combos (zx) with keys that | ||
33 | // convert to other keys on hold (z becomes ctrl when you hold it, | ||
34 | // and when this option isn't enabled, z rapidly followed by x | ||
35 | // actually sends Ctrl-x. That's bad.) | ||
36 | #define IGNORE_MOD_TAP_INTERRUPT | ||
37 | #undef PERMISSIVE_HOLD | ||
38 | //#define TAPPING_FORCE_HOLD | ||
39 | //#define RETRO_TAPPING | ||
40 | |||
41 | #ifndef TAPPING_TOGGLE | ||
42 | #define TAPPING_TOGGLE 1 | ||
43 | #endif | ||
44 | |||
45 | #ifdef TAPPING_TERM | ||
46 | # undef TAPPING_TERM | ||
47 | #endif // !TAPPING_TERM | ||
48 | #if defined(KEYBOARD_ergodash) | ||
49 | #define TAPPING_TERM 240 | ||
50 | #else | ||
51 | #define TAPPING_TERM 200 | ||
52 | #endif | ||
53 | |||
54 | #define TAP_CODE_DELAY 5 //DEFAULT: 100 | ||
55 | |||
56 | #define MACRO_TIMER 5 | ||
diff --git a/users/yet-another-developer/leader.c b/users/yet-another-developer/leader.c new file mode 100644 index 000000000..3cbbf8d70 --- /dev/null +++ b/users/yet-another-developer/leader.c | |||
@@ -0,0 +1,46 @@ | |||
1 | #include "leader.h" | ||
2 | |||
3 | LEADER_EXTERNS(); | ||
4 | |||
5 | // Runs constantly in the background, in a loop. | ||
6 | void matrix_scan_user(void){ | ||
7 | |||
8 | #ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code. | ||
9 | // run_diablo_macro_check(); | ||
10 | #endif // TAP_DANCE_ENABLE | ||
11 | |||
12 | #ifdef RGBLIGHT_ENABLE | ||
13 | matrix_scan_rgb(); | ||
14 | #endif // RGBLIGHT_ENABLE | ||
15 | |||
16 | LEADER_DICTIONARY() { | ||
17 | leading = false; | ||
18 | leader_end(); | ||
19 | |||
20 | SEQ_TWO_KEYS(KC_V, KC_Z){ | ||
21 | // vim: Zoom pane | ||
22 | tap_code16(LCTL(KC_W)); | ||
23 | tap_code16(LSFT(KC_BSLS)); | ||
24 | } | ||
25 | |||
26 | SEQ_TWO_KEYS(KC_V, KC_R) { | ||
27 | // vim: Substitute and place cursor | ||
28 | SEND_STRING(":%s///g" SS_TAP(X_LEFT)); | ||
29 | tap_code(KC_LEFT); | ||
30 | tap_code(KC_LEFT); | ||
31 | } | ||
32 | |||
33 | SEQ_TWO_KEYS(KC_V, KC_T) { | ||
34 | // vim: move current pane to new tab | ||
35 | tap_code16(LCTL(KC_W)); | ||
36 | tap_code16(LSFT(KC_T)); | ||
37 | } | ||
38 | |||
39 | SEQ_THREE_KEYS(KC_BSPC, KC_BSPC, KC_BSPC){ | ||
40 | // Reset the keyboard | ||
41 | reset_keyboard(); | ||
42 | } | ||
43 | } | ||
44 | |||
45 | matrix_scan_keymap(); | ||
46 | } | ||
diff --git a/users/yet-another-developer/leader.h b/users/yet-another-developer/leader.h new file mode 100644 index 000000000..7ed6c8a82 --- /dev/null +++ b/users/yet-another-developer/leader.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #pragma once | ||
2 | #include "yet-another-developer.h" | ||
3 | |||
4 | #include "leader.h" | ||
5 | |||
6 | void matrix_scan_user(void); | ||
diff --git a/users/yet-another-developer/process_records.c b/users/yet-another-developer/process_records.c new file mode 100644 index 000000000..c7dbd704a --- /dev/null +++ b/users/yet-another-developer/process_records.c | |||
@@ -0,0 +1,193 @@ | |||
1 | #include "yet-another-developer.h" | ||
2 | |||
3 | uint16_t copy_paste_timer; | ||
4 | |||
5 | __attribute__ ((weak)) | ||
6 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | ||
7 | return true; | ||
8 | } | ||
9 | |||
10 | __attribute__ ((weak)) | ||
11 | bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { | ||
12 | return true; | ||
13 | } | ||
14 | |||
15 | // Defines actions for my global custom keycodes. Defined in yet-another-developer.h file | ||
16 | // Then runs the _keymap's record handier if not processed here | ||
17 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
18 | |||
19 | // If console is enabled, it will print the matrix position and status of each key pressed | ||
20 | #ifdef KEYLOGGER_ENABLE | ||
21 | #if defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_keebio_iris_rev2) | ||
22 | xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.row, record->event.key.col, record->event.pressed); | ||
23 | #else | ||
24 | xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); | ||
25 | #endif | ||
26 | #endif //KEYLOGGER_ENABLE | ||
27 | |||
28 | switch (keycode) { | ||
29 | case KC_QWERTY ... KC_UNICODE: | ||
30 | if (record->event.pressed) { | ||
31 | set_single_persistent_default_layer(keycode - KC_QWERTY); | ||
32 | } | ||
33 | break; | ||
34 | |||
35 | case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader | ||
36 | if (!record->event.pressed) { | ||
37 | clear_mods(); | ||
38 | clear_oneshot_mods(); | ||
39 | send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), TAP_CODE_DELAY); | ||
40 | { | ||
41 | send_string_with_delay_P(PSTR(":flash"), TAP_CODE_DELAY); | ||
42 | } | ||
43 | } | ||
44 | break; | ||
45 | |||
46 | /* Tap Dance */ | ||
47 | case MC_QT1: // "" | ||
48 | if(record->event.pressed){ | ||
49 | SEND_STRING("\"\""); | ||
50 | tap_code(KC_LEFT); | ||
51 | } | ||
52 | break; | ||
53 | case MC_QT2: // '' | ||
54 | if(record->event.pressed){ | ||
55 | SEND_STRING("''"); | ||
56 | tap_code(KC_LEFT); | ||
57 | } | ||
58 | break; | ||
59 | case MC_QT3: // `' | ||
60 | if(record->event.pressed){ | ||
61 | SEND_STRING("`'"); | ||
62 | tap_code(KC_LEFT); | ||
63 | } | ||
64 | break; | ||
65 | case MC_PAR: // Parenthesis | ||
66 | if(record->event.pressed){ | ||
67 | SEND_STRING("()"); | ||
68 | tap_code(KC_LEFT); | ||
69 | } | ||
70 | break; | ||
71 | case MC_CUR: // Curly bracket | ||
72 | if(record->event.pressed){ | ||
73 | SEND_STRING("{}"); | ||
74 | tap_code(KC_LEFT); | ||
75 | } | ||
76 | break; | ||
77 | case MC_SQR: // Square bracket | ||
78 | if(record->event.pressed){ | ||
79 | SEND_STRING("[]"); | ||
80 | tap_code(KC_LEFT); | ||
81 | } | ||
82 | break; | ||
83 | case MC_ABR: // Angle bracket | ||
84 | if(record->event.pressed){ | ||
85 | SEND_STRING("<>"); | ||
86 | tap_code(KC_LEFT); | ||
87 | } | ||
88 | break; | ||
89 | case MCT_NEW: // New Tmux Session | ||
90 | if(record->event.pressed){ | ||
91 | SEND_STRING(":neww"); | ||
92 | tap_code(KC_ENT); | ||
93 | } | ||
94 | break; | ||
95 | case MCT_SH: // Tmux horizontal split | ||
96 | if(record->event.pressed){ | ||
97 | SEND_STRING("%"); | ||
98 | } | ||
99 | break; | ||
100 | case MCT_SV: // Tmux vertical split | ||
101 | if(record->event.pressed){ | ||
102 | SEND_STRING("\""); | ||
103 | } | ||
104 | break; | ||
105 | case MCT_ZM: // Tmux zoom | ||
106 | if(record->event.pressed){ | ||
107 | tap_code(KC_Z); | ||
108 | } | ||
109 | break; | ||
110 | case MCT_SCR: // Tmux scroll mode | ||
111 | if(record->event.pressed){ | ||
112 | tap_code(KC_PGUP); | ||
113 | } | ||
114 | break; | ||
115 | case MCT_UP: // Tmux up | ||
116 | break; | ||
117 | case MCT_DW: // Tmux down | ||
118 | break; | ||
119 | case MCT_LFT: // Tmux left | ||
120 | break; | ||
121 | case MCT_RGT: // Tmux right | ||
122 | tap_code(KC_RIGHT); | ||
123 | break; | ||
124 | case MCV_B: // Vim begin of line | ||
125 | if(record->event.pressed){ | ||
126 | tap_code(KC_0); | ||
127 | } | ||
128 | break; | ||
129 | case MCV_E: // Vim end of line | ||
130 | if(record->event.pressed){ | ||
131 | SEND_STRING(":vsplit"); | ||
132 | tap_code(KC_ENT); | ||
133 | } | ||
134 | break; | ||
135 | case MCT_F: // Vim for loop | ||
136 | if(record->event.pressed){ | ||
137 | SEND_STRING(":help"); | ||
138 | tap_code(KC_ENT); | ||
139 | } | ||
140 | break; | ||
141 | |||
142 | case VRSN: // Prints firmware version | ||
143 | if (record->event.pressed) { | ||
144 | send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY); | ||
145 | } | ||
146 | break; | ||
147 | |||
148 | |||
149 | case KC_CCCV: // One key copy/paste | ||
150 | if (record->event.pressed) { | ||
151 | copy_paste_timer = timer_read(); | ||
152 | } else { | ||
153 | if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy | ||
154 | register_code(KC_LCTL); | ||
155 | tap_code(KC_C); | ||
156 | unregister_code(KC_LCTL); | ||
157 | } else { // Tap, paste | ||
158 | register_code(KC_LCTL); | ||
159 | tap_code(KC_V); | ||
160 | unregister_code(KC_LCTL); | ||
161 | } | ||
162 | } | ||
163 | break; | ||
164 | #ifdef UNICODE_ENABLE | ||
165 | case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻ | ||
166 | if (record->event.pressed) { | ||
167 | send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); | ||
168 | } | ||
169 | break; | ||
170 | case UC_TABL: // ┬─┬ノ( º _ ºノ) | ||
171 | if (record->event.pressed) { | ||
172 | send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 30CE 0029"); | ||
173 | } | ||
174 | break; | ||
175 | case UC_SHRG: // ¯\_(ツ)_/¯ | ||
176 | if (record->event.pressed) { | ||
177 | send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF"); | ||
178 | } | ||
179 | break; | ||
180 | case UC_DISA: // ಠ_ಠ | ||
181 | if (record->event.pressed) { | ||
182 | send_unicode_hex_string("0CA0 005F 0CA0"); | ||
183 | } | ||
184 | break; | ||
185 | #endif // UNICODE_ENABLE | ||
186 | } | ||
187 | |||
188 | return process_record_keymap(keycode, record) && | ||
189 | #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) | ||
190 | process_record_user_rgb(keycode, record) && | ||
191 | #endif // RGBLIGHT_ENABLE | ||
192 | process_record_secrets(keycode, record); | ||
193 | } | ||
diff --git a/users/yet-another-developer/process_records.h b/users/yet-another-developer/process_records.h new file mode 100644 index 000000000..d4576f541 --- /dev/null +++ b/users/yet-another-developer/process_records.h | |||
@@ -0,0 +1,109 @@ | |||
1 | #pragma once | ||
2 | #include "yet-another-developer.h" | ||
3 | |||
4 | #if defined(KEYMAP_SAFE_RANGE) | ||
5 | # define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE | ||
6 | #else | ||
7 | # define PLACEHOLDER_SAFE_RANGE SAFE_RANGE | ||
8 | #endif | ||
9 | |||
10 | enum userspace_custom_keycodes { | ||
11 | VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info | ||
12 | KC_QWERTY, // Sets default layer to QWERTY | ||
13 | KC_COLEMAK, // Sets default layer to COLEMAK | ||
14 | KC_DVORAK, // Sets default layer to DVORAK | ||
15 | KC_WORKMAN, // Sets default layer to WORKMAN | ||
16 | KC_UNICODE, // Sets default layer to UNICOD | ||
17 | |||
18 | KC_MAKE, // Run keyboard's customized make command | ||
19 | KC_SECRET_1, // test1 | ||
20 | KC_SECRET_2, // test2 | ||
21 | KC_SECRET_3, // test3 | ||
22 | KC_SECRET_4, // test4 | ||
23 | KC_SECRET_5, // test5 | ||
24 | KC_CCCV, // Hold to copy, tap to paste | ||
25 | KC_NUKE, // NUCLEAR LAUNCH DETECTED!!! | ||
26 | UC_FLIP, // (ಠ痊ಠ)┻━┻ | ||
27 | UC_TABL, // ┬─┬ノ( º _ ºノ) | ||
28 | UC_SHRG, // ¯\_(ツ)_/¯ | ||
29 | UC_DISA, // ಠ_ಠ | ||
30 | |||
31 | MC_QT1, // "" | ||
32 | MC_QT2, // '' | ||
33 | MC_QT3, // `' | ||
34 | MC_PAR, // Parenthesis | ||
35 | MC_CUR, // Curly bracket | ||
36 | MC_SQR, // Square bracket | ||
37 | MC_ABR, // Angle bracket | ||
38 | MCT_NEW, // New Tmux Session | ||
39 | MCT_SH, // Tmux horizontal split | ||
40 | MCT_SV, // Tmux vertical split | ||
41 | MCT_ZM, // Tmux zoom | ||
42 | MCT_SCR, // Tmux scroll mode | ||
43 | MCT_UP, // Tmux up | ||
44 | MCT_DW, // Tmux down | ||
45 | MCT_LFT, // Tmux left | ||
46 | MCT_RGT, // Tmux right | ||
47 | MCV_B, // Vim begin of line | ||
48 | MCV_E, // Vim end of line | ||
49 | MCT_F, // Vim for loop | ||
50 | MCG_A, // Git add | ||
51 | MCG_C, // Git commit | ||
52 | MCG_P, // Git push | ||
53 | MCG_R, // Git revert | ||
54 | MCG_L, // Git log | ||
55 | MCG_S, // Git status | ||
56 | |||
57 | NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes | ||
58 | }; | ||
59 | |||
60 | bool process_record_secrets(uint16_t keycode, keyrecord_t *record); | ||
61 | bool process_record_keymap( uint16_t keycode, keyrecord_t *record); | ||
62 | |||
63 | #define LOWER MO(_LOWER) | ||
64 | #define RAISE MO(_RAISE) | ||
65 | #define ADJUST MO(_ADJUST) | ||
66 | #define TG_MODS TG(_MODS) | ||
67 | #define OS_LWR OSL(_LOWER) | ||
68 | #define OS_RSE OSL(_RAISE) | ||
69 | #define OS_UNI OSL(_UNICODE) | ||
70 | |||
71 | #define KC_SEC1 KC_SECRET_1 | ||
72 | #define KC_SEC2 KC_SECRET_2 | ||
73 | #define KC_SEC3 KC_SECRET_3 | ||
74 | #define KC_SEC4 KC_SECRET_4 | ||
75 | #define KC_SEC5 KC_SECRET_5 | ||
76 | |||
77 | #define QWERTY KC_QWERTY | ||
78 | #define DVORAK KC_DVORAK | ||
79 | #define COLEMAK KC_COLEMAK | ||
80 | #define WORKMAN KC_WORKMAN | ||
81 | #define UNICODE KC_UNICODE | ||
82 | |||
83 | #define KC_RESET RESET | ||
84 | #define KC_RST KC_RESET | ||
85 | |||
86 | #define BK_LWER LT(_LOWER, KC_BSPC) | ||
87 | #define SP_LWER LT(_LOWER, KC_SPC) | ||
88 | #define DL_RAIS LT(_RAISE, KC_DEL) | ||
89 | #define ET_RAIS LT(_RAISE, KC_ENTER) | ||
90 | |||
91 | /* OSM keycodes, to keep things clean and easy to change */ | ||
92 | #define KC_MLSF OSM(MOD_LSFT) | ||
93 | #define KC_MRSF OSM(MOD_RSFT) | ||
94 | |||
95 | #define OS_LGUI OSM(MOD_LGUI) | ||
96 | #define OS_RGUI OSM(MOD_RGUI) | ||
97 | #define OS_LSFT OSM(MOD_LSFT) | ||
98 | #define OS_RSFT OSM(MOD_RSFT) | ||
99 | #define OS_LCTL OSM(MOD_LCTL) | ||
100 | #define OS_RCTL OSM(MOD_RCTL) | ||
101 | #define OS_LALT OSM(MOD_LALT) | ||
102 | #define OS_RALT OSM(MOD_RALT) | ||
103 | #define OS_MEH OSM(MOD_MEH) | ||
104 | #define OS_HYPR OSM(MOD_HYPR) | ||
105 | |||
106 | #define ALT_APP ALT_T(KC_APP) | ||
107 | |||
108 | #define UC_IRNY UC(0x2E2E) | ||
109 | #define UC_CLUE UC(0x203D) | ||
diff --git a/users/yet-another-developer/rules.mk b/users/yet-another-developer/rules.mk new file mode 100644 index 000000000..597df6d0b --- /dev/null +++ b/users/yet-another-developer/rules.mk | |||
@@ -0,0 +1,50 @@ | |||
1 | SRC += yet-another-developer.c \ | ||
2 | process_records.c | ||
3 | |||
4 | LINK_TIME_OPTIMIZATION_ENABLE = yes | ||
5 | SPACE_CADET_ENABLE = no | ||
6 | |||
7 | ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) | ||
8 | SRC += tap_dances.c | ||
9 | endif | ||
10 | |||
11 | ifeq ($(strip $(COMBO_ENABLE)), yes) | ||
12 | SRC += combo.c | ||
13 | endif | ||
14 | |||
15 | |||
16 | ifeq ($(strip $(LEADER_ENABLE)), yes) | ||
17 | SRC += leader.c | ||
18 | endif | ||
19 | |||
20 | |||
21 | ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") | ||
22 | SRC += secrets.c | ||
23 | endif | ||
24 | |||
25 | |||
26 | ifeq ($(strip $(NO_SECRETS)), yes) | ||
27 | OPT_DEFS += -DNO_SECRETS | ||
28 | endif | ||
29 | |||
30 | |||
31 | ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) | ||
32 | SRC += unicode.c | ||
33 | endif | ||
34 | |||
35 | |||
36 | ifeq ($(strip $(MACROS_ENABLED)), yes) | ||
37 | OPT_DEFS += -DMACROS_ENABLED | ||
38 | endif | ||
39 | |||
40 | |||
41 | ifdef CONSOLE_ENABLE | ||
42 | ifeq ($(strip $(KEYLOGGER_ENABLE)), yes) | ||
43 | OPT_DEFS += -DKEYLOGGER_ENABLE | ||
44 | endif | ||
45 | endif | ||
46 | |||
47 | |||
48 | ifeq ($(strip $(MAKE_BOOTLOADER)), yes) | ||
49 | OPT_DEFS += -DMAKE_BOOTLOADER | ||
50 | endif | ||
diff --git a/users/yet-another-developer/tap_dances.c b/users/yet-another-developer/tap_dances.c new file mode 100644 index 000000000..66dcc60fa --- /dev/null +++ b/users/yet-another-developer/tap_dances.c | |||
@@ -0,0 +1,55 @@ | |||
1 | #include "tap_dances.h" | ||
2 | |||
3 | void td_parenthesis (qk_tap_dance_state_t *state, void *user_data) { | ||
4 | if (state->count == 1) { | ||
5 | // SEND_STRING ("\("); | ||
6 | tap_code(KC_QUOT); | ||
7 | reset_tap_dance (state); | ||
8 | } | ||
9 | else if (state->count == 2) { | ||
10 | SEND_STRING("()" SS_TAP(X_LEFT)); | ||
11 | reset_tap_dance (state); | ||
12 | } | ||
13 | else if (state->count == 3) { | ||
14 | SEND_STRING("[]" SS_TAP(X_LEFT)); | ||
15 | reset_tap_dance (state); | ||
16 | } | ||
17 | else if (state->count == 4) { | ||
18 | SEND_STRING("{}" SS_TAP(X_LEFT)); | ||
19 | reset_tap_dance (state); | ||
20 | } | ||
21 | else if (state->count >= 5) { | ||
22 | SEND_STRING("<>" SS_TAP(X_LEFT)); | ||
23 | reset_tap_dance (state); | ||
24 | } | ||
25 | } | ||
26 | |||
27 | void safe_reset(qk_tap_dance_state_t *state, void *user_data) { | ||
28 | if (state->count >= 3) { | ||
29 | // Reset the keyboard if you tap the key more than three times | ||
30 | reset_keyboard(); | ||
31 | reset_tap_dance(state); | ||
32 | } | ||
33 | } | ||
34 | |||
35 | qk_tap_dance_action_t tap_dance_actions[] = { | ||
36 | [TD_RESET] = ACTION_TAP_DANCE_FN(safe_reset), | ||
37 | [TD_NUM1] = ACTION_TAP_DANCE_DOUBLE(KC_1, KC_4), | ||
38 | [TD_NUM2] = ACTION_TAP_DANCE_DOUBLE(KC_2, KC_5), | ||
39 | [TD_NUM3] = ACTION_TAP_DANCE_DOUBLE(KC_3, KC_6), | ||
40 | [TD_QT1] = ACTION_TAP_DANCE_DOUBLE(KC_QUOT, MC_QT1), | ||
41 | [TD_QT2] = ACTION_TAP_DANCE_DOUBLE(LSFT(KC_QUOT), MC_QT2), | ||
42 | [TD_QT3] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, MC_QT3), | ||
43 | |||
44 | [TD_EOL] = ACTION_TAP_DANCE_DOUBLE(KC_E, MC_EOL), // end of line | ||
45 | [TD_BOL] = ACTION_TAP_DANCE_DOUBLE(KC_A, MC_BOL), // beginning of line | ||
46 | [TD_NW] = ACTION_TAP_DANCE_DOUBLE(KC_F, MC_NW), // next word | ||
47 | [TD_PW] = ACTION_TAP_DANCE_DOUBLE(KC_B, MC_PW), // pevious word | ||
48 | [TD_DW] = ACTION_TAP_DANCE_DOUBLE(KC_W, MC_DW), // pevious word | ||
49 | |||
50 | [TD_SPC] = ACTION_TAP_DANCE_FN(td_parenthesis), // \(, (), [], {}, <> | ||
51 | [TD_PAR] = ACTION_TAP_DANCE_DOUBLE(KC_LPRN, MC_PAR), // () | ||
52 | [TD_SQR] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, MC_SQR), // [] | ||
53 | [TD_CUR] = ACTION_TAP_DANCE_DOUBLE(LSFT(KC_LCBR), MC_CUR),// {} | ||
54 | [TD_ABR] = ACTION_TAP_DANCE_DOUBLE(LSFT(KC_COMM), MC_ABR),// | ||
55 | }; | ||
diff --git a/users/yet-another-developer/tap_dances.h b/users/yet-another-developer/tap_dances.h new file mode 100644 index 000000000..8afda817c --- /dev/null +++ b/users/yet-another-developer/tap_dances.h | |||
@@ -0,0 +1,26 @@ | |||
1 | #pragma once | ||
2 | #include "yet-another-developer.h" | ||
3 | |||
4 | #ifdef TAP_DANCE_ENABLE | ||
5 | enum { | ||
6 | TD_RESET = 0, | ||
7 | TD_SPC, // for special function td_parenthesis testing | ||
8 | TD_NUM1, // compact gaming numpad | ||
9 | TD_NUM2, // | ||
10 | TD_NUM3, // | ||
11 | TD_TMX, // tmux control sequence | ||
12 | TD_EOL, // end of line | ||
13 | TD_BOL, // beginning of line | ||
14 | TD_NW, // next word | ||
15 | TD_PW, // pevious word | ||
16 | TD_DW, // delete word | ||
17 | TD_QT1, // single double quote for ' | ||
18 | TD_QT2, // single double quote for " | ||
19 | TD_QT3, // single double quote for ` | ||
20 | TD_PAR, // single double parenthesis | ||
21 | TD_CUR, // single double curly braces | ||
22 | TD_SQR, // single double square brackets | ||
23 | TD_ABR // single double angle brackets | ||
24 | }; | ||
25 | #endif // TAP_DANCE_ENABLE | ||
26 | void td_parenthesis (qk_tap_dance_state_t *state, void *user_data); | ||
diff --git a/users/yet-another-developer/unicode.c b/users/yet-another-developer/unicode.c new file mode 100644 index 000000000..8b312deb6 --- /dev/null +++ b/users/yet-another-developer/unicode.c | |||
@@ -0,0 +1,62 @@ | |||
1 | #include "unicode.h" | ||
2 | |||
3 | //#ifdef UNICODEMAP_ENABLE | ||
4 | const uint32_t PROGMEM unicode_map[] = { | ||
5 | [BANG] = 0x0203D,// ‽ | ||
6 | [IRONY] = 0x02E2E,// ⸮ | ||
7 | [DEGREE] = 0x000B0,// ° | ||
8 | [THINK] = 0x1F914,// 🤔 | ||
9 | [GRIN] = 0x1F600,// � | ||
10 | [MONOCL] = 0x1F9D0,// 🧐 | ||
11 | [DRUG0] = 0x1F92A,// 🤪 | ||
12 | [DRUG1] = 0x1F974,// 🥴 | ||
13 | [CLOWN] = 0x1F921,// 🤡 | ||
14 | [MNDBLWN] = 0x1F92F,// 🤯 | ||
15 | [MONEY] = 0x1F911,// 🤑 | ||
16 | [SHTUP] = 0x1F910,// 🤐 | ||
17 | [PARTY] = 0x1F973,// 🥳 | ||
18 | [SMRK] = 0x1F60F,// 😏 | ||
19 | [WEARY] = 0x1F629,// 😩 | ||
20 | [UNAMU] = 0x1F612,// 😒 | ||
21 | [SPY] = 0x1F575,//🕵 | ||
22 | [DAFUQ] = 0x1F47A,// 👺 | ||
23 | [FIST0] = 0x1F91B,// 🤛 | ||
24 | [FIST1] = 0x1F91C,// 🤜 | ||
25 | [FIST2] = 0x270A, // ✊ | ||
26 | [FIST3] = 0x1F44A,// 👊 | ||
27 | [WIFIHAND] = 0x1F44B,// 👋 | ||
28 | [OKOK] = 0x1F44C,// 👌 | ||
29 | [EFFU] = 0x1F595,// 🖕 | ||
30 | [SPOCK] = 0x1F596,// 🖖 | ||
31 | [INUP] = 0x1F446,// 👆 | ||
32 | [THDN] = 0x1F44E,// 👎 | ||
33 | [THUP] = 0x1F44D,// 👍 | ||
34 | [TUMBLER] = 0x1F943,// 🥃 | ||
35 | [DRAGON0] = 0x1F409,// 🐉 | ||
36 | [DRAGON1] = 0x1F432,// 🐲 | ||
37 | [TIGER0] = 0x1F405,// 🐅 | ||
38 | [TIGER1] = 0x1F42F,// 🐯 | ||
39 | [COOL] = 0x1F192,// 🆒 | ||
40 | [UCHART] = 0x1F4C8,// 📈 | ||
41 | [DCHART] = 0x1F4C9,// 📉 | ||
42 | [BCHART] = 0x1F4CA,// 📊 | ||
43 | [NOPRCY] = 0x1F572,// 🕲 | ||
44 | [PRCY] = 0x1F571,// 🕱 | ||
45 | [BBB] = 0x1F171,// 🅱 | ||
46 | [POO] = 0x1F4A9,// 💩 | ||
47 | [HUNDR] = 0x1F4AF,// 💯 | ||
48 | [EGGPL] = 0x1F346,// 🍆 | ||
49 | [WATER] = 0x1F4A6,// 💦 | ||
50 | [LIT] = 0x1F525,// 🔥 | ||
51 | [SNEK] = 0x1F40D,// 🐍 | ||
52 | [PENGUIN] = 0x1F427,// 🐧 | ||
53 | [BOAR] = 0x1F417,// 🐗 | ||
54 | [MONKEY] = 0x1F412,// 🐒 | ||
55 | [CHICK] = 0x1F425,// 🐥 | ||
56 | [DASH] = 0x1F4A8,// 💨 | ||
57 | [DIZZY] = 0x1F4AB,// 💫 | ||
58 | [KEEB] = 0x1F5AE,// 🖮 | ||
59 | [HOLE] = 0x1F573,// 🕳 | ||
60 | [SAUCER] = 0x1F6F8// 🛸 | ||
61 | }; | ||
62 | //#endif // UNICODEMAP_ENABLE | ||
diff --git a/users/yet-another-developer/unicode.h b/users/yet-another-developer/unicode.h new file mode 100644 index 000000000..cb550243e --- /dev/null +++ b/users/yet-another-developer/unicode.h | |||
@@ -0,0 +1,67 @@ | |||
1 | #pragma once | ||
2 | |||
3 | #include "quantum.h" | ||
4 | |||
5 | void send_unicode_hex_string(const char* str); | ||
6 | |||
7 | /* use X(n) to call the */ | ||
8 | #ifdef UNICODEMAP_ENABLE | ||
9 | enum unicode_name { | ||
10 | OKOK, // | ||
11 | BANG, // ‽ | ||
12 | IRONY, // ⸮ | ||
13 | DEGREE, // ° | ||
14 | THINK, // 🤔 | ||
15 | GRIN, // � | ||
16 | MONOCL, // 🧐 | ||
17 | DRUG0, // 🤪 | ||
18 | DRUG1, // 🥴 | ||
19 | CLOWN, // 🤡 | ||
20 | MNDBLWN, // 🤯 | ||
21 | MONEY, // 🤑 | ||
22 | SHTUP, // 🤐 | ||
23 | PARTY, // 🥳 | ||
24 | SMRK, // 😏 | ||
25 | WEARY, // 😩 | ||
26 | UNAMU, // 😒 | ||
27 | SPY, // 🕵 | ||
28 | DAFUQ, // 👺 | ||
29 | FIST0, // 🤛 | ||
30 | FIST1, // 🤜 | ||
31 | FIST2, // ✊ | ||
32 | FIST3, // 👊 | ||
33 | WIFIHAND, // 👌 | ||
34 | EFFU, // 🖕 | ||
35 | SPOCK, // 🖖 | ||
36 | INUP, // 👆 | ||
37 | THDN, // 👎 | ||
38 | THUP, // 👍 | ||
39 | TUMBLER, // 🥃 | ||
40 | DRAGON0, // 🐉 | ||
41 | DRAGON1, // 🐅 | ||
42 | TIGER0, // 🐅 | ||
43 | TIGER1, // 🐯 | ||
44 | COOL, // 🆒 | ||
45 | UCHART, // 📈 | ||
46 | DCHART, // 📉 | ||
47 | BCHART, // 📊 | ||
48 | NOPRCY, // 🕲 | ||
49 | PRCY, // 🕱 | ||
50 | BBB, // 🅱 | ||
51 | POO, // 💩 | ||
52 | HUNDR, // 💯 | ||
53 | EGGPL, // 🍆 | ||
54 | WATER, // 💦 | ||
55 | LIT, // 🔥 | ||
56 | SNEK, // 🐍 | ||
57 | PENGUIN, // 🐧 | ||
58 | BOAR, // 🐗 | ||
59 | MONKEY, // 🐒 | ||
60 | CHICK, // 🐥 | ||
61 | DASH, // 💨 | ||
62 | DIZZY, // 💫 | ||
63 | KEEB, // 🖮 | ||
64 | HOLE, // 🕳 | ||
65 | SAUCER // 🛸 | ||
66 | }; | ||
67 | #endif | ||
diff --git a/users/yet-another-developer/wrappers.h b/users/yet-another-developer/wrappers.h new file mode 100644 index 000000000..cd21032a4 --- /dev/null +++ b/users/yet-another-developer/wrappers.h | |||
@@ -0,0 +1,166 @@ | |||
1 | #pragma once | ||
2 | #include "yet-another-developer.h" | ||
3 | |||
4 | /* | ||
5 | Since our quirky block definitions are basically a list of comma separated | ||
6 | arguments, we need a wrapper in order for these definitions to be | ||
7 | expanded before being used as arguments to the LAYOUT_xxx macro. | ||
8 | */ | ||
9 | #if (!defined(LAYOUT) && defined(KEYMAP)) | ||
10 | # define LAYOUT KEYMAP | ||
11 | #endif | ||
12 | |||
13 | // clang-format off | ||
14 | |||
15 | #define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__) | ||
16 | #define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) | ||
17 | #define LAYOUT_ortho_5x14_wrapper(...) LAYOUT_ortho_5x14(__VA_ARGS__) | ||
18 | |||
19 | /* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */ | ||
20 | #define LAYOUT_ergodash_pretty( \ | ||
21 | L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ | ||
22 | L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ | ||
23 | L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ | ||
24 | L30, L31, L32, L33, L34, L35, R31, R32, R33, R34, R35, R36, \ | ||
25 | L40, L41, L42, L43, R43, R44, R45, R46, \ | ||
26 | L36, R30, \ | ||
27 | L44, L45, L46, R40, R41, R42 \ | ||
28 | ) \ | ||
29 | { \ | ||
30 | { L00, L01, L02, L03, L04, L05, L06 }, \ | ||
31 | { L10, L11, L12, L13, L14, L15, L16 }, \ | ||
32 | { L20, L21, L22, L23, L24, L25, L26 }, \ | ||
33 | { L30, L31, L32, L33, L34, L35, L36 }, \ | ||
34 | { L40, L41, L42, L43, L44, L45, L46 }, \ | ||
35 | { R06, R05, R04, R03, R02, R01, R00 }, \ | ||
36 | { R16, R15, R14, R13, R12, R11, R10 }, \ | ||
37 | { R26, R25, R24, R23, R22, R21, R20 }, \ | ||
38 | { R36, R35, R34, R33, R32, R31, R30 }, \ | ||
39 | { R46, R45, R44, R43, R42, R41, R40 } \ | ||
40 | } | ||
41 | |||
42 | /* | ||
43 | Blocks for each of the four major keyboard layouts | ||
44 | Organized so we can quickly adapt and modify all of them | ||
45 | at once, rather than for each keyboard, one at a time. | ||
46 | And this allows for much cleaner blocks in the keymaps. | ||
47 | For instance Tap/Hold for Control on all of the layouts | ||
48 | |||
49 | NOTE: These are all the same length. If you do a search/replace | ||
50 | then you need to add/remove underscores to keep the | ||
51 | lengths consistent. | ||
52 | */ | ||
53 | |||
54 | #define _________________QWERTY_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T | ||
55 | #define _________________QWERTY_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G | ||
56 | #define _________________QWERTY_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B | ||
57 | |||
58 | #define _________________QWERTY_R1_________________ KC_Y, KC_U, KC_I, KC_O, KC_P | ||
59 | #define _________________QWERTY_R2_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN | ||
60 | #define _________________QWERTY_R3_________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLASH | ||
61 | |||
62 | |||
63 | #ifdef TAP_DANCE_ENABLE | ||
64 | #define _________________COLEMAK_L1________________ KC_Q, KC_W, KC_F, KC_P, KC_G | ||
65 | #define _________________COLEMAK_L2________________ KC_BOL, KC_R, KC_S, KC_T, KC_D | ||
66 | #define _________________COLEMAK_L3________________ KC_Z, KC_X, KC_C, KC_V, KC_B | ||
67 | |||
68 | #define _________________COLEMAK_R1________________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN | ||
69 | #define _________________COLEMAK_R2________________ KC_H, KC_N, KC_E, KC_I, KC_O | ||
70 | #define _________________COLEMAK_R3________________ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLASH | ||
71 | #else | ||
72 | #define _________________COLEMAK_L1________________ KC_Q, KC_W, KC_F, KC_P, KC_G | ||
73 | #define _________________COLEMAK_L2________________ KC_A, KC_R, KC_S, KC_T, KC_D | ||
74 | #define _________________COLEMAK_L3________________ KC_Z, KC_X, KC_C, KC_V, KC_B | ||
75 | |||
76 | #define _________________COLEMAK_R1________________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN | ||
77 | #define _________________COLEMAK_R2________________ KC_H, KC_N, KC_E, KC_I, KC_O | ||
78 | #define _________________COLEMAK_R3________________ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLASH | ||
79 | #endif | ||
80 | |||
81 | |||
82 | |||
83 | |||
84 | #define _________________DVORAK_L1_________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y | ||
85 | #define _________________DVORAK_L2_________________ KC_A, KC_O, KC_E, KC_U, KC_I | ||
86 | #define _________________DVORAK_L3_________________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X | ||
87 | |||
88 | #define _________________DVORAK_R1_________________ KC_F, KC_G, KC_C, KC_R, KC_L | ||
89 | #define _________________DVORAK_R2_________________ KC_D, KC_H, KC_T, KC_N, KC_S | ||
90 | #define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, KC_Z | ||
91 | |||
92 | |||
93 | #define _________________WORKMAN_L1________________ KC_Q, KC_D, KC_R, KC_W, KC_B | ||
94 | #define _________________WORKMAN_L2________________ KC_A, KC_S, KC_H, KC_T, KC_G | ||
95 | #define _________________WORKMAN_L3________________ KC_Z, KC_X, KC_M, KC_C, KC_V | ||
96 | |||
97 | #define _________________WORKMAN_R1________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN | ||
98 | #define _________________WORKMAN_R2________________ KC_Y, KC_N, KC_E, KC_O, KC_I | ||
99 | #define _________________WORKMAN_R3________________ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLASH | ||
100 | |||
101 | // #define _________________WHITE_R1__________________ KC_V, KC_Y, KC_D, KC_COMM, KC_QUOT | ||
102 | // #define _________________WHITE_R2__________________ KC_A, KC_T, KC_H, KC_E, KC_B | ||
103 | // #define _________________WHITE_R3__________________ KC_P, KC_K, KC_G, KC_W, KC_Q | ||
104 | |||
105 | // #define _________________WHITE_L1__________________ KC_INT1, KC_J, KC_M, KC_L, KC_U | ||
106 | // #define _________________WHITE_L2__________________ KC_MINS, KC_C, KC_S, KC_N, KC_O // KC_I | ||
107 | // #define _________________WHITE_L3__________________ KC_X, KC_R, KC_F, KC_DOT, KC_Z | ||
108 | |||
109 | |||
110 | #ifdef UNICODE_ENABLE | ||
111 | #define _______________UNICODE_L1__________________ UC_DISA,UC_DISA, UC_DISA, UC_DISA, UC_DISA | ||
112 | #define _______________UNICODE_L2__________________ UC_DISA,UC_DISA, UC_DISA, UC_DISA, UC_DISA | ||
113 | #define _______________UNICODE_L3__________________ UC_DISA,UC_DISA, UC_DISA, UC_DISA, UC_DISA | ||
114 | |||
115 | #define _______________UNICODE_R1__________________ UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG | ||
116 | #define _______________UNICODE_R2__________________ UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG | ||
117 | #define _______________UNICODE_R3__________________ UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG | ||
118 | #endif | ||
119 | |||
120 | #ifdef UNICODEMAP_ENABLE | ||
121 | #define _______________UNICODE_L1__________________ X(SMRK), X(THINK), X(CLOWN), X(HUNDR), X(BANG) | ||
122 | #define _______________UNICODE_L2__________________ X(GRIN), X(MONKEY), X(OKOK), X(EGGPL), X(LIT) | ||
123 | #define _______________UNICODE_L3__________________ X(WEARY), X(UNAMU), X(EFFU), X(MONOCL), X(IRONY) | ||
124 | |||
125 | #define _______________UNICODE_R1__________________ X(DRUG0), X(THUP), X(INUP), X(DIZZY), X(COOL) | ||
126 | #define _______________UNICODE_R2__________________ X(FIST0), X(FIST2),X(FIST3),X(FIST1), X(OKOK) | ||
127 | #define _______________UNICODE_R3__________________ X(MNDBLWN), X(THDN), X(SPOCK),X(HOLE), X(DASH) | ||
128 | #endif | ||
129 | |||
130 | #define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5 | ||
131 | #define ________________NUMBER_RIGHT_______________ KC_6, KC_7, KC_8, KC_9, KC_0 | ||
132 | #define _________________FUNC_LEFT_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 | ||
133 | #define _________________FUNC_RIGHT________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 | ||
134 | |||
135 | #define ___________________BLANK___________________ _______, _______, _______, _______, _______ | ||
136 | |||
137 | |||
138 | #define _________________LOWER_L1__________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC | ||
139 | #define _________________LOWER_L2__________________ _________________FUNC_LEFT_________________ | ||
140 | #define _________________LOWER_L3__________________ _________________FUNC_RIGHT________________ | ||
141 | |||
142 | #define _________________LOWER_R1__________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN | ||
143 | #define _________________LOWER_R2__________________ OS_UNI, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR | ||
144 | #define _________________LOWER_R3__________________ _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | ||
145 | |||
146 | |||
147 | |||
148 | #define _________________RAISE_L1__________________ ________________NUMBER_LEFT________________ | ||
149 | #define _________________RAISE_L2__________________ ___________________BLANK___________________ | ||
150 | #define _________________RAISE_L3__________________ ___________________BLANK___________________ | ||
151 | |||
152 | #define _________________RAISE_R1__________________ ________________NUMBER_RIGHT_______________ | ||
153 | #define _________________RAISE_R2__________________ _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC | ||
154 | #define _________________RAISE_R3__________________ _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END | ||
155 | |||
156 | |||
157 | |||
158 | #define _________________ADJUST_L1_________________ ___________________BLANK___________________ | ||
159 | #define _________________ADJUST_L2_________________ _________________FUNC_LEFT_________________ | ||
160 | #define _________________ADJUST_L3_________________ _______, QWERTY, COLEMAK, DVORAK, WORKMAN | ||
161 | |||
162 | #define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5 | ||
163 | #define _________________ADJUST_R2_________________ _________________FUNC_RIGHT________________ | ||
164 | #define _________________ADJUST_R3_________________ KC_MUTE, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT | ||
165 | |||
166 | // clang-format on | ||
diff --git a/users/yet-another-developer/yet-another-developer.c b/users/yet-another-developer/yet-another-developer.c new file mode 100644 index 000000000..b729c0621 --- /dev/null +++ b/users/yet-another-developer/yet-another-developer.c | |||
@@ -0,0 +1,160 @@ | |||
1 | #include "quantum.h" | ||
2 | #include "yet-another-developer.h" | ||
3 | |||
4 | userspace_config_t userspace_config; | ||
5 | |||
6 | #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) | ||
7 | #define YAD_UNICODE_MODE UC_WIN | ||
8 | #else | ||
9 | // set to 2 for UC_WIN, set to 4 for UC_WINC | ||
10 | #define YAD_UNICODE_MODE 2 | ||
11 | #endif | ||
12 | |||
13 | |||
14 | bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed) { | ||
15 | static uint16_t this_timer; | ||
16 | if (pressed) { | ||
17 | this_timer = timer_read(); | ||
18 | } else { | ||
19 | if (timer_elapsed(this_timer) < TAPPING_TERM) { | ||
20 | tap_code(code); | ||
21 | } else { | ||
22 | register_code(mod_code); | ||
23 | tap_code(code); | ||
24 | unregister_code(mod_code); | ||
25 | } | ||
26 | } | ||
27 | return false; | ||
28 | } | ||
29 | |||
30 | bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer) { | ||
31 | if (pressed) { | ||
32 | this_timer = timer_read(); | ||
33 | } else { | ||
34 | if (timer_elapsed(this_timer) < TAPPING_TERM) { | ||
35 | tap_code(code); | ||
36 | } else { | ||
37 | register_code(mod_code); | ||
38 | tap_code(code); | ||
39 | unregister_code(mod_code); | ||
40 | } | ||
41 | } | ||
42 | return false; | ||
43 | } | ||
44 | |||
45 | // Add reconfigurable functions here, for keymap customization | ||
46 | // This allows for a global, userspace functions, and continued | ||
47 | // customization of the keymap. Use _keymap instead of _user | ||
48 | // functions in the keymaps | ||
49 | __attribute__ ((weak)) | ||
50 | void matrix_init_keymap(void) {} | ||
51 | |||
52 | // Call user matrix init, set default RGB colors and then | ||
53 | // call the keymap's init function | ||
54 | void matrix_init_user(void) { | ||
55 | userspace_config.raw = eeconfig_read_user(); | ||
56 | |||
57 | #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) | ||
58 | set_unicode_input_mode(YAD_UNICODE_MODE); | ||
59 | get_unicode_input_mode(); | ||
60 | #endif //UNICODE_ENABLE | ||
61 | |||
62 | matrix_init_keymap(); | ||
63 | } | ||
64 | |||
65 | __attribute__((weak)) | ||
66 | void keyboard_post_init_keymap(void) {} | ||
67 | |||
68 | void keyboard_post_init_user(void) { | ||
69 | #ifdef RGBLIGHT_ENABLE | ||
70 | keyboard_post_init_rgb(); | ||
71 | #endif | ||
72 | keyboard_post_init_keymap(); | ||
73 | } | ||
74 | |||
75 | __attribute__((weak)) | ||
76 | void suspend_power_down_keymap(void) {} | ||
77 | |||
78 | void suspend_power_down_user(void) { | ||
79 | suspend_power_down_keymap(); | ||
80 | } | ||
81 | |||
82 | __attribute__((weak)) | ||
83 | void suspend_wakeup_init_keymap(void) {} | ||
84 | |||
85 | void suspend_wakeup_init_user(void) { | ||
86 | suspend_wakeup_init_keymap(); | ||
87 | } | ||
88 | |||
89 | __attribute__((weak)) | ||
90 | void matrix_scan_keymap(void) {} | ||
91 | |||
92 | __attribute__ ((weak)) | ||
93 | void matrix_scan_user(void){ | ||
94 | |||
95 | #ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code. | ||
96 | // run_diablo_macro_check(); | ||
97 | #endif // TAP_DANCE_ENABLE | ||
98 | |||
99 | #ifdef RGBLIGHT_ENABLE | ||
100 | matrix_scan_rgb(); | ||
101 | #endif // RGBLIGHT_ENABLE | ||
102 | |||
103 | matrix_scan_keymap(); | ||
104 | } | ||
105 | |||
106 | __attribute__((weak)) | ||
107 | layer_state_t layer_state_set_keymap(layer_state_t state) { | ||
108 | return state; | ||
109 | } | ||
110 | |||
111 | // on layer change, no matter where the change was initiated | ||
112 | // Then runs keymap's layer change check | ||
113 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
114 | state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); | ||
115 | #ifdef RGBLIGHT_ENABLE | ||
116 | state = layer_state_set_rgb(state); | ||
117 | #endif // RGBLIGHT_ENABLE | ||
118 | return layer_state_set_keymap(state); | ||
119 | } | ||
120 | |||
121 | __attribute__((weak)) | ||
122 | layer_state_t default_layer_state_set_keymap(layer_state_t state) { | ||
123 | return state; | ||
124 | } | ||
125 | |||
126 | // Runs state check and changes underglow color and animation | ||
127 | layer_state_t default_layer_state_set_user(layer_state_t state) { | ||
128 | state = default_layer_state_set_keymap(state); | ||
129 | #if 0 | ||
130 | #ifdef RGBLIGHT_ENABLE | ||
131 | state = default_layer_state_set_rgb(state); | ||
132 | #endif // RGBLIGHT_ENABLE | ||
133 | #endif | ||
134 | return state; | ||
135 | } | ||
136 | |||
137 | __attribute__ ((weak)) | ||
138 | void led_set_keymap(uint8_t usb_led) {} | ||
139 | |||
140 | // Any custom LED code goes here. | ||
141 | // So far, I only have keyboard specific code, | ||
142 | // So nothing goes here. | ||
143 | void led_set_user(uint8_t usb_led) { | ||
144 | led_set_keymap(usb_led); | ||
145 | } | ||
146 | |||
147 | __attribute__ ((weak)) | ||
148 | void eeconfig_init_keymap(void) {} | ||
149 | |||
150 | void eeconfig_init_user(void) { | ||
151 | userspace_config.raw = 0; | ||
152 | userspace_config.rgb_layer_change = true; | ||
153 | eeconfig_update_user(userspace_config.raw); | ||
154 | #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) | ||
155 | set_unicode_input_mode(YAD_UNICODE_MODE); | ||
156 | get_unicode_input_mode(); | ||
157 | #else | ||
158 | eeprom_update_byte(EECONFIG_UNICODEMODE, YAD_UNICODE_MODE); | ||
159 | #endif | ||
160 | } | ||
diff --git a/users/yet-another-developer/yet-another-developer.h b/users/yet-another-developer/yet-another-developer.h new file mode 100644 index 000000000..e0d02f707 --- /dev/null +++ b/users/yet-another-developer/yet-another-developer.h | |||
@@ -0,0 +1,87 @@ | |||
1 | #pragma once | ||
2 | #include "quantum.h" | ||
3 | #include "version.h" | ||
4 | #include "eeprom.h" | ||
5 | #include "wrappers.h" | ||
6 | #include "process_records.h" | ||
7 | |||
8 | #ifdef TAP_DANCE_ENABLE | ||
9 | #include "tap_dances.h" | ||
10 | #define KC_TMX TD(TD_TMX) // tap1: 't' tap2: <CTL>+b | ||
11 | #define KC_EOL TD(TD_EOL) // tap1: 'e' tap2: <CTL>+e | ||
12 | #define KC_BOL TD(TD_BOL) // tap1: 'a' tap2: <CTL>+a | ||
13 | #define KC_NW TD(TD_NW) // tap1: 'f' tap2: <ALT>+f | ||
14 | #define KC_PW TD(TD_PW) // tap1: 'b' tap2: <ALT>+b | ||
15 | #define KC_DW TD(TD_DW) // tap1: 'w' tap2: <CTL>+w | ||
16 | #endif //!TAP_DANCE_ENABLE | ||
17 | #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) | ||
18 | #include "rgb_stuff.h" | ||
19 | #endif | ||
20 | #if defined(UNICODEMAP_ENABLE) || defined(UNICODE_ENABLE) | ||
21 | #include "unicode.h" | ||
22 | #endif //!UNICODE_ENABLE | ||
23 | |||
24 | #define MC_BOL LCTL(KC_A) // jump to beginning of line | ||
25 | #define MC_EOL LCTL(KC_E) // jump to end of line | ||
26 | #define MC_NW LALT(KC_F) // next word | ||
27 | #define MC_PW LALT(KC_B) // previous word | ||
28 | #define MC_DW LCTL(KC_W) // delete word | ||
29 | |||
30 | /* Define layer names */ | ||
31 | enum userspace_layers { | ||
32 | _QWERTY = 0, | ||
33 | _NUMLOCK = 0, | ||
34 | _COLEMAK, | ||
35 | _DVORAK, | ||
36 | _WORKMAN, | ||
37 | _UNICODE, | ||
38 | _MODS, /* layer 8 */ | ||
39 | _MACROS, | ||
40 | _MEDIA, | ||
41 | _LOWER, | ||
42 | _RAISE, | ||
43 | _ADJUST, | ||
44 | }; | ||
45 | |||
46 | bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed); | ||
47 | bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer); | ||
48 | void matrix_init_keymap(void); | ||
49 | void suspend_power_down_keymap(void); | ||
50 | void suspend_wakeup_init_keymap(void); | ||
51 | void matrix_scan_keymap(void); | ||
52 | layer_state_t layer_state_set_keymap(layer_state_t state); | ||
53 | layer_state_t default_layer_state_set_keymap(layer_state_t state); | ||
54 | void led_set_keymap(uint8_t usb_led); | ||
55 | void eeconfig_init_keymap(void); | ||
56 | |||
57 | typedef union { | ||
58 | uint32_t raw; | ||
59 | struct { | ||
60 | bool rgb_layer_change :1; | ||
61 | bool is_overwatch :1; | ||
62 | bool nuke_switch :1; | ||
63 | uint8_t unicode_mod :4; | ||
64 | bool swapped_numbers :1; | ||
65 | }; | ||
66 | } userspace_config_t; | ||
67 | |||
68 | extern userspace_config_t userspace_config; | ||
69 | |||
70 | /* | ||
71 | Custom Keycodes for Diablo 3 layer | ||
72 | But since TD() doesn't work when tap dance is disabled | ||
73 | We use custom codes here, so we can substitute the right stuff | ||
74 | */ | ||
75 | #ifdef TAP_DANCE_ENABLE | ||
76 | #define KC_D3_1 TD(TD_D3_1) | ||
77 | #define KC_D3_2 TD(TD_D3_2) | ||
78 | #define KC_D3_3 TD(TD_D3_3) | ||
79 | #define KC_D3_4 TD(TD_D3_4) | ||
80 | #else // TAP_DANCE_ENABLE | ||
81 | #define KC_D3_1 KC_1 | ||
82 | #define KC_D3_2 KC_2 | ||
83 | #define KC_D3_3 KC_3 | ||
84 | #define KC_D3_4 KC_4 | ||
85 | #endif // TAP_DANCE_ENABLE | ||
86 | |||
87 | |||