diff options
Diffstat (limited to 'keyboards/3w6/keymaps/helltm/keymap.c')
-rw-r--r-- | keyboards/3w6/keymaps/helltm/keymap.c | 168 |
1 files changed, 168 insertions, 0 deletions
diff --git a/keyboards/3w6/keymaps/helltm/keymap.c b/keyboards/3w6/keymaps/helltm/keymap.c new file mode 100644 index 000000000..83ac6f02d --- /dev/null +++ b/keyboards/3w6/keymaps/helltm/keymap.c | |||
@@ -0,0 +1,168 @@ | |||
1 | /* Copyright 2021 HellSingCoder | ||
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 QMK_KEYBOARD_H | ||
18 | |||
19 | #ifdef COMBO_ENABLE | ||
20 | # include "combos.h" | ||
21 | #endif | ||
22 | |||
23 | enum layers | ||
24 | { | ||
25 | _ALPHA_QWERTY = 0, | ||
26 | _SYM, | ||
27 | _NAV, | ||
28 | _NUM, | ||
29 | }; | ||
30 | |||
31 | enum custom_keycodes { | ||
32 | KC_THUMB_SWAP, | ||
33 | }; | ||
34 | |||
35 | /* Space Enter swap */ | ||
36 | bool swap_space_enter = false; | ||
37 | |||
38 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
39 | |||
40 | /* | ||
41 | * QWERTY | ||
42 | * | ||
43 | * _____________________ _____________________ | ||
44 | * __|__ | | __|__ | ||
45 | * _____ | | v v | | _____ | ||
46 | * .-----| E |-----._____ _____.-----| I |-----. | ||
47 | * .-----| W |_____| R | T | __ ( ) __ | Y | U |_____| O |-----. | ||
48 | * __ | Q |-----| D |-----|_____| __|--> + - <--|__ |_____|-----| K |-----| P | __ | ||
49 | * ESC <--|__ |-----| S |_____| F | G | [ ] | H | J |_____| L |-----| __|--> ' | ||
50 | * __ | A |-----| C |-----|_____| __ __ |_____|-----| , < |-----| ; : | __ | ||
51 | * TAB <--|__ |-----| X |_____| V | B | __|--> * { } = <--|__ | N | M |_____| . > |-----| __|--> " | ||
52 | * | Z |-----' '-----|_____| |_____|-----' '-----| / ? | | ||
53 | * '-----' .-----. _____ .-.._ _..-. _____ .-----. '-----' | ||
54 | * | | WIN ||CTRL | / / \ \ | BSp || Del | | | ||
55 | * SHIFT '-----':_____|/ ENT / \ SPC \|_____:'-----' SHIFT | ||
56 | * | '--.._/ \_..--' | | | ||
57 | * NUM NAV SYM | ||
58 | */ | ||
59 | [_ALPHA_QWERTY] = LAYOUT( | ||
60 | KC_Q, KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , | ||
61 | KC_A, KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , | ||
62 | LSFT_T(KC_Z), KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , RSFT_T(KC_SLSH), | ||
63 | LT(_NUM, KC_LGUI), KC_LCTRL, KC_ENT, KC_SPC, LT(_NAV, KC_BSPC), LT(_SYM, KC_DEL) | ||
64 | ), | ||
65 | |||
66 | /* | ||
67 | * Symbols | ||
68 | * _____ _____ | ||
69 | * .-----| # |-----._____ _____.-----| * |-----. | ||
70 | * .-----| @ |_____| $ | % | | ^ | & |_____| ( |-----. | ||
71 | * | ! |-----| |-----|_____| |_____|-----| [ { |-----| ) | | ||
72 | * |-----| |_____| | | | { | } |_____| ] } |-----| | ||
73 | * | ` ~ |-----| |-----|_____| |_____|-----| |-----| ' " | | ||
74 | * |-----| |_____| | | | - _ | = + |_____| | |-----| | ||
75 | * | ~ |-----' '-----|_____| |_____|-----' '-----| \ | | | ||
76 | * '-----' .-----. _____ .-.._ _..-. _____ .-----. '-----' | ||
77 | * SHIFT | ||CTRL | / / \ \ | BSp || | SHIFT | ||
78 | * '-----':_____|/ ENT / \ SPC \|_____:'-----' | ||
79 | * '--.._/ \_..--' | ||
80 | */ | ||
81 | [_SYM] = LAYOUT( | ||
82 | KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN , | ||
83 | KC_GRV , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_QUOT , | ||
84 | LSFT_T(KC_TILD), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL , XXXXXXX, KC_PIPE, RSFT_T(KC_BSLS), | ||
85 | XXXXXXX, _______, _______, _______, KC_BSPC, XXXXXXX | ||
86 | ), | ||
87 | |||
88 | /* | ||
89 | * Navigation | ||
90 | * _____ _____ | ||
91 | * .-----|Mute |-----._____ _____.-----| Up |-----. | ||
92 | * .-----|VDown|_____| VUp | | | |PDown|_____| PUp |-----. | ||
93 | * | Esc |-----|Play |-----|_____| |_____|-----|Down |-----| BSp | | ||
94 | * |-----|Prev |_____|Next | | |Home |Left |_____|Right|-----| | ||
95 | * | Tab |-----|Stop |-----|_____| |_____|-----| |-----| ' " | | ||
96 | * |-----| |_____| | | | | |_____| End |-----| | ||
97 | * | CPS |-----' '-----|_____| |_____|-----' '-----| Del | | ||
98 | * '-----' .-----. _____ .-.._ _..-. _____ .-----. '-----' | ||
99 | * SHIFT | ||CTRL | / / \ \ | BSp || | SHIFT | ||
100 | * '-----':_____|/ ENT / \ SPC \|_____:'-----' | ||
101 | * '--.._/ \_..--' | ||
102 | */ | ||
103 | [_NAV] = LAYOUT( | ||
104 | KC_ESC , KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, KC_PGDN, KC_UP , KC_PGUP, KC_BSPC, | ||
105 | KC_TAB , KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_QUOT, | ||
106 | LSFT_T(KC_CAPS), XXXXXXX, KC_MSTP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_END , RSFT_T(KC_DEL) , | ||
107 | XXXXXXX, _______, _______, _______, KC_BSPC, XXXXXXX | ||
108 | ), | ||
109 | |||
110 | /* | ||
111 | * Numbers | ||
112 | * _____ _____ | ||
113 | * .-----| 3 |-----._____ _____.-----| 8 |-----. | ||
114 | * .-----| 2 |_____| 4 | 5 | | 6 | 7 |_____| 9 |-----. | ||
115 | * | 1 |-----| F3 |-----|_____| |_____|-----| F8 |-----| 0 | | ||
116 | * |-----| F2 |_____| F4 | F5 | | F6 | F7 |_____| F9 |-----| | ||
117 | * | F1 |-----| Scr |-----|_____| |_____|-----| |-----| F10 | | ||
118 | * |-----| TMg |_____| |Swap | | | |_____| F11 |-----| | ||
119 | * |Shift|-----' '-----|_____| |_____|-----' '-----| F12 | | ||
120 | * '-----' .-----. _____ .-.._ _..-. _____ .-----. '-----' | ||
121 | * | ||CTRL | / / \ \ | BSp || | SHIFT | ||
122 | * '-----':_____|/ ENT / \ SPC \|_____:'-----' | ||
123 | * '--.._/ \_..--' | ||
124 | */ | ||
125 | [_NUM] = LAYOUT( | ||
126 | KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , | ||
127 | KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , | ||
128 | KC_LSFT, LCA(KC_DEL), SWIN(KC_S), XXXXXXX, KC_THUMB_SWAP, XXXXXXX, XXXXXXX, XXXXXXX, KC_F11 , RSFT_T(KC_F12) , | ||
129 | XXXXXXX, _______, _______, _______, KC_BSPC, XXXXXXX | ||
130 | ), | ||
131 | }; | ||
132 | |||
133 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
134 | switch (keycode) { | ||
135 | |||
136 | /* Space Enter swap */ | ||
137 | case KC_THUMB_SWAP: | ||
138 | if (record->event.pressed) { | ||
139 | unregister_code(KC_SPC); | ||
140 | unregister_code(KC_ENT); | ||
141 | swap_space_enter = !swap_space_enter; | ||
142 | } | ||
143 | return false; | ||
144 | break; | ||
145 | |||
146 | case KC_ENT: | ||
147 | if (swap_space_enter) { | ||
148 | if (record->event.pressed) { | ||
149 | register_code(KC_SPC); | ||
150 | } else { | ||
151 | unregister_code(KC_SPC); | ||
152 | } | ||
153 | return false; | ||
154 | } | ||
155 | break; | ||
156 | case KC_SPC: | ||
157 | if (swap_space_enter) { | ||
158 | if (record->event.pressed) { | ||
159 | register_code(KC_ENT); | ||
160 | } else { | ||
161 | unregister_code(KC_ENT); | ||
162 | } | ||
163 | return false; | ||
164 | } | ||
165 | break; | ||
166 | } | ||
167 | return true; | ||
168 | } | ||