aboutsummaryrefslogtreecommitdiff
path: root/keyboards/jd45
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2016-08-25 23:26:02 +0300
committerFred Sundvik <fsundvik@gmail.com>2016-08-25 23:26:02 +0300
commit523dff3005193f72247addff70c8cb238ac6164b (patch)
tree43b0835c0dc3b59ad7366b8ae77acfb8e21fdc98 /keyboards/jd45
parent2e3834edea1bc2f83477dff1a423adc87c357471 (diff)
parent4321f0af7d34f794a372964be49d225442671c45 (diff)
downloadqmk_firmware-523dff3005193f72247addff70c8cb238ac6164b.tar.gz
qmk_firmware-523dff3005193f72247addff70c8cb238ac6164b.zip
Merge branch 'master' into makefile_overhaul
Diffstat (limited to 'keyboards/jd45')
-rw-r--r--keyboards/jd45/keymaps/jeebak/config.h16
-rw-r--r--keyboards/jd45/keymaps/jeebak/keymap.c423
-rw-r--r--keyboards/jd45/keymaps/jeebak/readme.md129
3 files changed, 568 insertions, 0 deletions
diff --git a/keyboards/jd45/keymaps/jeebak/config.h b/keyboards/jd45/keymaps/jeebak/config.h
new file mode 100644
index 000000000..53a1f0a30
--- /dev/null
+++ b/keyboards/jd45/keymaps/jeebak/config.h
@@ -0,0 +1,16 @@
1#include "../../config.h"
2
3/**
4 *JD45 keymap definition macro
5 */
6#define KEYMAP_JD45( \
7 K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, \
8 K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, \
9 K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, K37, \
10 K38, K39, K40, K41, K42, K43, K44, K45, K46, K47 \
11) { \
12 { K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13 }, \
13 { K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, KC_NO }, \
14 { K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, K37, KC_NO }, \
15 { K38, K39, K40, K41, K42, KC_NO, K43, KC_NO, K44, K45, K46, K47, KC_NO } \
16}
diff --git a/keyboards/jd45/keymaps/jeebak/keymap.c b/keyboards/jd45/keymaps/jeebak/keymap.c
new file mode 100644
index 000000000..8d26cbde1
--- /dev/null
+++ b/keyboards/jd45/keymaps/jeebak/keymap.c
@@ -0,0 +1,423 @@
1#include "jd45.h"
2
3extern keymap_config_t keymap_config;
4
5// Each layer gets a name for readability, which is then used in the keymap matrix below.
6// The underscores don't mean anything - you can have a layer called STUFF or any other name.
7// Layer names don't all need to be of the same length, obviously, and you can also skip them
8// entirely and just use numbers.
9#define _QWERTY 0
10#define _COLEMAK 1
11#define _DVORAK 2
12#define _LOWER 3
13#define _RAISE 4
14#define _PLOVER 5
15#define _TOUCHCURSOR 6
16#define _MOUSECURSOR 7
17#define _ADJUST 16
18
19// Keycodes
20enum planck_keycodes {
21 QWERTY = SAFE_RANGE,
22 COLEMAK,
23 DVORAK,
24 PLOVER,
25 LOWER,
26 RAISE,
27 BACKLIT,
28 EXT_PLV
29};
30
31enum macro_keycodes {
32 KC_ALT_TAB,
33 KC_CMD_TAB,
34 KC_CTL_TAB,
35 KC_CMD_SLSH,
36 KC_AG_FIND,
37 KC_AG_AGAIN,
38 KC_AG_UNDO,
39 KC_AG_CUT,
40 KC_AG_COPY,
41 KC_AG_PASTE,
42 KC_AG_DESK_L,
43 KC_AG_DESK_R,
44 KC_AG_TAB_C,
45 KC_AG_TAB_N,
46 KC_AG_TAB_R,
47};
48
49// Fillers to make layering more clear
50#define _______ KC_TRNS
51#define XXXXXXX KC_NO
52
53// Custom macros
54#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl
55#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift
56#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper
57#define GUI_SEM GUI_T(KC_SCLN) // Tap for Semicolon, hold for GUI
58#define ALT_QUO ALT_T(KC_QUOT) // Tap for Quote, hold for Alt
59// Requires KC_TRNS/_______ for the trigger key in the destination layer
60#define LT_TC LT(_TOUCHCURSOR, KC_SPC) // L-ayer T-ap T-ouch C-ursor
61#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor
62#define ALT_TAB M(KC_ALT_TAB) // Macro for Alt-Tab
63#define CMD_TAB M(KC_CMD_TAB) // Macro for Cmd-Tab
64#define CTL_TAB M(KC_CTL_TAB) // Macro for Ctl-Tab
65#define CMD_SLSH M(KC_CMD_SLSH) // Macro for Cmd-Slash (personal shortcut to toggle iTerm2 visibility)
66#define AG_FIND M(KC_AG_FIND) // Macros for Cmd-[x] vs Ctrl-[x] based on current AG_NORM or AG_SWAP settings
67#define AG_AGAIN M(KC_AG_AGAIN)
68#define AG_UNDO M(KC_AG_UNDO)
69#define AG_CUT M(KC_AG_CUT)
70#define AG_COPY M(KC_AG_COPY)
71#define AG_PASTE M(KC_AG_PASTE)
72#define AG_D_L M(KC_AG_DESK_L) // For Virtual Desktop Switching: Left, and
73#define AG_D_R M(KC_AG_DESK_R) // Right
74#define AG_T_C M(KC_AG_TAB_C) // For Chrome, etc. Tab Close,
75#define AG_T_N M(KC_AG_TAB_N) // Tab New, and
76#define AG_T_R M(KC_AG_TAB_R) // Tab Reopen Closed
77
78/* Qwerty
79 *
80 * ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
81 * |Hyper/Tab| Q | W | E | R | T | Y | U | I | O | P | Bksp | Bksp |
82 * |---------`------`------`------`------`------`------`------`------`------`------`------`------|
83 * | Ctrl/Esc | A | S | MC/D | F | G | H | J | K | L |GUI/; | Alt/" |
84 * |----------`------`------`------`------`------`------`------`------`------`------`------------|
85 * | Shift | Z | X | C | V | B | N | M | , | . | / | Sft/Ent |
86 * |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------|
87 * | RGUI | Alt | GUI | Lower | TC/Space | TC/Space | Raise | Vol- | Vol+ | Play |
88 * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
89 */
90
91const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
92[_QWERTY] = KEYMAP_JD45(
93/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
94 HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_BSPC,
95/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
96 CTL_ESC , KC_A, KC_S,LT_MC(KC_D), KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, GUI_SEM, ALT_QUO ,
97/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
98 KC_LSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT ,
99/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
100 KC_RGUI , KC_LALT , KC_LGUI , LOWER , LT_TC , LT_TC , RAISE , KC_VOLD , KC_VOLU , KC_MPLY),
101/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
102
103/* Colemak
104 * ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
105 * |Hyper/Tab| Q | W | F | P | G | J | L | U | Y | ; | Bksp | Bksp |
106 * |---------`------`------`------`------`------`------`------`------`------`------`------`------|
107 * | Ctrl/Esc | A | R | MC/S | T | D | H | N | E | I | O | " |
108 * |----------`------`------`------`------`------`------`------`------`------`------`------------|
109 * | Shift | Z | X | C | V | B | K | M | , | . | / | Sft/Ent |
110 * |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------|
111 * | RGUI | Alt | GUI | Lower | TC/Space | TC/Space | Raise | Vol- | Vol+ | Play |
112 * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
113 */
114[_COLEMAK] = KEYMAP_JD45(
115/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
116 HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, KC_BSPC,
117/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
118 CTL_ESC , KC_A, KC_R,LT_MC(KC_S), KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT ,
119/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
120 KC_LSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT ,
121/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
122 KC_RGUI , KC_LALT , KC_LGUI , LOWER , LT_TC , LT_TC , RAISE , KC_VOLD , KC_VOLU , KC_MPLY),
123/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
124
125/* Dvorak
126 * ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
127 * |Hyper/Tab| " | , | . | P | Y | F | G | C | R | L | Bksp | Bksp |
128 * |---------`------`------`------`------`------`------`------`------`------`------`------`------|
129 * | Ctrl/Esc | A | O | MC/E | U | I | D | H | T | N | S | / |
130 * |----------`------`------`------`------`------`------`------`------`------`------`------------|
131 * | Shift | ; | Q | J | K | X | B | M | W | V | Z | Sft/Ent |
132 * |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------|
133 * | RGUI | Alt | GUI | Lower | TC/Space | TC/Space | Raise | Vol- | Vol+ | Play |
134 * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
135 */
136[_DVORAK] = KEYMAP_JD45(
137/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
138 HPR_TAB,KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, KC_BSPC,
139/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
140 CTL_ESC , KC_A, KC_O,LT_MC(KC_E), KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH ,
141/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
142 KC_LSFT , KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT ,
143/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
144 KC_RGUI , KC_LALT , KC_LGUI , LOWER , LT_TC , LT_TC , RAISE , KC_VOLD , KC_VOLU , KC_MPLY),
145/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
146
147/* Lower
148 * ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
149 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | Bksp |
150 * |---------`------`------`------`------`------`------`------`------`------`------`------`------|
151 * | [ | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | "|" |
152 * |----------`------`------`------`------`------`------`------`------`------`------`------------|
153 * | ] | F7 | F8 | F9 | F10 | F11 | F12 | - | = | [ | ] | \ |
154 * |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------|
155 * | Brite | | | | | | | Prev | Next | Mute |
156 * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
157 */
158[_LOWER] = KEYMAP_JD45(
159/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
160 KC_TILD,KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, KC_BSPC,
161/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
162 KC_LBRC , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE ,
163/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
164 KC_RBRC , KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS ,
165/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
166 BACKLIT , _______, _______, _______, _______ , _______ , _______, KC_MPRV, KC_MNXT, KC_MUTE),
167/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
168
169/* Raise
170 * ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
171 * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | Bksp |
172 * |---------`------`------`------`------`------`------`------`------`------`------`------`------|
173 * | $ | 4 | 5 | 6 | . | + | . | 4 | 5 | 6 | * | "|" |
174 * |----------`------`------`------`------`------`------`------`------`------`------`------------|
175 * | = | 7 | 8 | 9 | 0 | - | . | 1 | 2 | 3 | / | \ |
176 * |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------|
177 * | Brite | | | | | | | Prev | Next | Mute |
178 * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
179 */
180[_RAISE] = KEYMAP_JD45(
181/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
182 KC_0 , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_BSPC,
183/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
184 KC_DLR , KC_4, KC_5, KC_6, KC_DOT, KC_PLUS, KC_DOT, KC_4, KC_5, KC_6, KC_ASTR, KC_PIPE ,
185/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
186 KC_EQL , KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_DOT, KC_1, KC_2, KC_3, KC_SLSH, KC_BSLS ,
187/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
188 BACKLIT , _______, _______, _______, _______ , _______ , _______, KC_MPRV, KC_MNXT, KC_MUTE),
189/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
190
191/* TouchCursor layer (http://martin-stone.github.io/touchcursor/) plus personal customizations
192 * ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
193 * | AltTab |CmdTab|CtlTab| GUI |Shift | ~ |Insert| Home | Up | End | Bksp | | |
194 * |---------`------`------`------`------`------`------`------`------`------`------`------`------|
195 * | | Alt |Space |Tab_C | Find |Again | PgUp | Left | Down |Right |Desk_L| Desk_R |
196 * |----------`------`------`------`------`------`------`------`------`------`------`------------|
197 * | | Undo | Cut | Copy |Paste | ` | PgDn | Del |Tab_N |Tab_R |iTerm2| |
198 * |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------|
199 * | | | | | | | | | | |
200 * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
201 *
202 * The KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, KC_FIND, and KC_AGAIN keycodes don't
203 * seem to work on Mac. Presumably they'll work under Windows.
204 */
205
206[_TOUCHCURSOR] = KEYMAP_JD45(
207/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
208 ALT_TAB,CMD_TAB, CTL_TAB, KC_LGUI, KC_LSFT, KC_TILD, KC_INS, KC_HOME, KC_UP, KC_END, KC_BSPC, _______, _______,
209/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
210 _______ ,KC_LALT, KC_SPC, AG_T_C, AG_FIND,AG_AGAIN, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, AG_D_L, AG_D_R ,
211/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
212 _______ ,AG_UNDO, AG_CUT, AG_COPY,AG_PASTE, KC_GRV, KC_PGDN, KC_DEL, AG_T_N, AG_T_R,CMD_SLSH, _______ ,
213/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
214 _______ , _______, _______, _______, _______ , _______ , _______, _______, _______, _______),
215/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
216
217/* Mouse Layer
218 * ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
219 * | | |ACCL0 | | | | |WHL_L | Up |WHL_R | BTN2 | | |
220 * |---------`------`------`------`------`------`------`------`------`------`------`------`------|
221 * | |ACCL2 | BTN2 | | BTN1 |ACCL1 |WHL_Up| Left | Down |Right | BTN4 | BTN5 |
222 * |----------`------`------`------`------`------`------`------`------`------`------`------------|
223 * | | | | | BTN3 | |WHL_Dn| BTN1 | | | BTN3 | |
224 * |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------|
225 * | | | | | | | | | | |
226 * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
227 */
228
229[_MOUSECURSOR] = KEYMAP_JD45(
230/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
231 _______,_______, KC_ACL0, _______, _______, _______, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_BTN2, _______, _______,
232/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
233 _______ ,KC_ACL2, KC_BTN2, _______, KC_BTN1, KC_ACL1, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN4, KC_BTN5 ,
234/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
235 _______ ,_______, _______, _______, KC_BTN3, _______, KC_WH_D, KC_BTN1, _______, _______, KC_BTN3, _______ ,
236/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
237 _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______),
238/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
239
240/* Plover layer (http://opensteno.org)
241 * ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
242 * | # | # | # | # | # | # | # | # | # | # | # | # | # |
243 * |---------`------`------`------`------`------`------`------`------`------`------`------`------|
244 * | | S | T | P | H | * | * | F | P | L | T | D |
245 * |----------`------`------`------`------`------`------`------`------`------`------`------------|
246 * | TogOut | S | K | W | R | * | * | R | B | G | S | Z |
247 * |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------|
248 * | Exit | | A | O | | | E | U | | |
249 * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
250 */
251
252[_PLOVER] = KEYMAP_JD45(
253/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
254 KC_1 , KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 ,
255/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
256 XXXXXXX , KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC ,
257/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
258 XXXXXXX , KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT ,
259/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
260 EXT_PLV , XXXXXXX, KC_C, KC_V, XXXXXXX , XXXXXXX , KC_N, KC_M, XXXXXXX, XXXXXXX),
261/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
262
263/* Adjust (Lower + Raise)
264 * ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
265 * | | | | | | | | | | | | | Del |
266 * |---------`------`------`------`------`------`------`------`------`------`------`------`------|
267 * | | | | | |AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| |
268 * |----------`------`------`------`------`------`------`------`------`------`------`------------|
269 * | | | | | | | | | | | | |
270 * |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------|
271 * | | | | | | | | | | Reset |
272 * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
273 */
274[_ADJUST] = KEYMAP_JD45(
275/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
276 _______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL ,
277/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
278 _______ ,_______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______ ,
279/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
280 _______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
281/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
282 _______ , _______, _______, _______, _______ , _______ , _______, _______, _______, RESET)
283/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
284};
285
286void persistant_default_layer_set(uint16_t default_layer) {
287 eeconfig_update_default_layer(default_layer);
288 default_layer_set(default_layer);
289}
290
291bool process_record_user(uint16_t keycode, keyrecord_t *record) {
292 switch (keycode) {
293 case QWERTY:
294 if (record->event.pressed) {
295 default_layer_set(1UL<<_QWERTY);
296 }
297 return false;
298 break;
299 case COLEMAK:
300 if (record->event.pressed) {
301 default_layer_set(1UL<<_COLEMAK);
302 }
303 return false;
304 break;
305 case DVORAK:
306 if (record->event.pressed) {
307 default_layer_set(1UL<<_DVORAK);
308 }
309 return false;
310 break;
311 case LOWER:
312 if (record->event.pressed) {
313 layer_on(_LOWER);
314 update_tri_layer(_LOWER, _RAISE, _ADJUST);
315 } else {
316 layer_off(_LOWER);
317 update_tri_layer(_LOWER, _RAISE, _ADJUST);
318 }
319 return false;
320 break;
321 case RAISE:
322 if (record->event.pressed) {
323 layer_on(_RAISE);
324 update_tri_layer(_LOWER, _RAISE, _ADJUST);
325 } else {
326 layer_off(_RAISE);
327 update_tri_layer(_LOWER, _RAISE, _ADJUST);
328 }
329 return false;
330 break;
331 case BACKLIT:
332 if (record->event.pressed) {
333 register_code(KC_RSFT);
334 #ifdef BACKLIGHT_ENABLE
335 backlight_step();
336 #endif
337 } else {
338 unregister_code(KC_RSFT);
339 }
340 return false;
341 break;
342 case PLOVER:
343 if (record->event.pressed) {
344 layer_off(_RAISE);
345 layer_off(_LOWER);
346 layer_off(_ADJUST);
347 layer_on(_PLOVER);
348 if (!eeconfig_is_enabled()) {
349 eeconfig_init();
350 }
351 keymap_config.raw = eeconfig_read_keymap();
352 keymap_config.nkro = 1;
353 eeconfig_update_keymap(keymap_config.raw);
354 }
355 return false;
356 break;
357 case EXT_PLV:
358 if (record->event.pressed) {
359 layer_off(_PLOVER);
360 }
361 return false;
362 break;
363 }
364 return true;
365}
366
367/*
368 * Macro definition
369 */
370const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
371{
372 if (!eeconfig_is_enabled()) {
373 eeconfig_init();
374 }
375
376 bool use_cmd = true; // Use, for example, Cmd-Tab, Cmd-C, Cmd-V, etc.
377 // Compare to MAGIC_SWAP_ALT_GUI and MAGIC_UNSWAP_ALT_GUI configs, set in:
378 // quantum/quantum.c
379 if(keymap_config.swap_lalt_lgui == 1 && keymap_config.swap_ralt_rgui == 1) {
380 use_cmd = false; // ... or, Alt-Tab, Ctrl-C, Ctrl-V, etc.
381 }
382
383 switch (id) {
384 case KC_ALT_TAB:
385 if(use_cmd) { return (record->event.pressed ? MACRO( D(LALT), D(TAB), END ) : MACRO( U(TAB), END )); }
386 else { return (record->event.pressed ? MACRO( D(LGUI), D(TAB), END ) : MACRO( U(TAB), END )); }
387 case KC_CMD_TAB:
388 if(use_cmd) { return (record->event.pressed ? MACRO( D(LGUI), D(TAB), END ) : MACRO( U(TAB), END )); }
389 else { return (record->event.pressed ? MACRO( D(LALT), D(TAB), END ) : MACRO( U(TAB), END )); }
390
391 case KC_CTL_TAB:
392 return (record->event.pressed ? MACRO( D(LCTRL), D(TAB), END ) : MACRO( U(TAB), END ));
393 case KC_CMD_SLSH:
394 return (record->event.pressed ? MACRO( D(LGUI), D(SLSH),END ) : MACRO( U(SLSH),END ));
395
396 case KC_AG_FIND:
397 return use_cmd ? MACRODOWN( D(LGUI), T(F), END ) : MACRODOWN( D(LCTRL), T(F), END );
398 case KC_AG_AGAIN:
399 return use_cmd ? MACRODOWN( D(LGUI), T(G), END ) : MACRODOWN( D(LCTRL), T(G), END );
400 case KC_AG_UNDO:
401 return use_cmd ? MACRODOWN( D(LGUI), T(Z), END ) : MACRODOWN( D(LCTRL), T(Z), END );
402 case KC_AG_CUT:
403 return use_cmd ? MACRODOWN( D(LGUI), T(X), END ) : MACRODOWN( D(LCTRL), T(X), END );
404 case KC_AG_COPY:
405 return use_cmd ? MACRODOWN( D(LGUI), T(C), END ) : MACRODOWN( D(LCTRL), T(C), END );
406 case KC_AG_PASTE:
407 return use_cmd ? MACRODOWN( D(LGUI), T(V), END ) : MACRODOWN( D(LCTRL), T(V), END );
408
409 case KC_AG_DESK_L:
410 return use_cmd ? MACRODOWN( D(LGUI), D(LCTRL), T(SCLN), END ) : MACRODOWN( D(LALT), D(LCTRL), T(SCLN), END );
411 case KC_AG_DESK_R:
412 return use_cmd ? MACRODOWN( D(LGUI), D(LCTRL), T(QUOT), END ) : MACRODOWN( D(LALT), D(LCTRL), T(QUOT), END );
413
414 case KC_AG_TAB_C:
415 return use_cmd ? MACRODOWN( D(LGUI), T(W), END ) : MACRODOWN( D(LCTRL), T(W), END );
416 case KC_AG_TAB_N:
417 return use_cmd ? MACRODOWN( D(LGUI), T(T), END ) : MACRODOWN( D(LCTRL), T(T), END );
418 case KC_AG_TAB_R:
419 return use_cmd ? MACRODOWN( D(LGUI), D(LSHIFT), T(T), END ) : MACRODOWN( D(LCTRL), D(LSHIFT), T(T), END );
420 }
421
422 return MACRO_NONE;
423}
diff --git a/keyboards/jd45/keymaps/jeebak/readme.md b/keyboards/jd45/keymaps/jeebak/readme.md
new file mode 100644
index 000000000..2e45a46d9
--- /dev/null
+++ b/keyboards/jd45/keymaps/jeebak/readme.md
@@ -0,0 +1,129 @@
1jeebak's JD45 layout
2=======================
3NOTE: This is a port of jeebak's planck layout, for jd45.
4
5This WIP keymap attempts to minimize fingers straying away from the home row.
6To aid in this endeavor, when additional modifyer keys to switch layers are
7needed, they will be mapped to home row keys. The `keymap.c` file will contain
8the exact changes. The diagrams in this README shows the highlights of the
9changes from the default mappings.
10
11I also decided to change all calls to `persistant_default_layer_set()` to
12`default_layer_set()` since this is my personal perference.
13
14## Macros
15```
16#define ALT_TAB M(KC_ALT_TAB)
17```
18
19## Base Layers (Qwerty/Colemak/Dvorak)
20These base layers are mostly the same as the default mappings. The interesting
21changes are shown below.
22
23- The `Ctrl/Esc`, will emit an `Escape` when tapped, and act as a `Control` key when held,
24- `GUI/;` as `;` and `GUI`,
25- `Alt/"` as `"` and `Alt`,
26- `Sft/Ent` as `Enter` and `Shift`, and
27- `Hyper/Tab` as `Tab` and `Hyper`
28
29A `TODO` item is to see if it can also act as a `CapsLock` when double-tapped.
30The arrow keys, which have been moved to the
31[TouchCursor](http://martin-stone.github.io/touchcursor/) layer, have been
32replaced with the Media keys as shown. The `MC/kc` key activates the
33`MouseCursor` layer when held, and emits the corresponding `kc` for its layer,
34when tapped.
35```
36 ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
37 |Hyper/Tab| Q | W | E | R | T | Y | U | I | O | P | [ | Bksp |
38 |---------`------`------`------`------`------`------`------`------`------`------`------`------|
39 | Ctrl/Esc | A | S | MC/D | F | G | H | J | K | L |GUI/; | Alt/" |
40 |----------`------`------`------`------`------`------`------`------`------`------`------------|
41 | Shift | Z | X | C | V | B | N | M | , | . | / | Sft/Ent |
42 |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------|
43 | RGUI | Alt | GUI | Lower | TC/Space | TC/Space | Raise | Vol- | Vol+ | Play |
44 `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
45```
46
47## Lower Layer (Symbols and Function Keys)
48The symbols and functions keys are essentially the same as the default mapping.
49The most notable changes are that the symbol keys from the `RAISE` layer have
50been moved here. The remaining Media keys replace those that are now on the
51base layers. The `BACKLIT` key has also been moved here.
52```
53 ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
54 | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | Bksp |
55 |---------`------`------`------`------`------`------`------`------`------`------`------`------|
56 | [ | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | "|" |
57 |----------`------`------`------`------`------`------`------`------`------`------`------------|
58 | ] | F7 | F8 | F9 | F10 | F11 | F12 | - | = | [ | ] | \ |
59 |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------|
60 | Brite | | | | | | | Prev | Next | Mute |
61 `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
62```
63
64## Raise Layer (Numbers and Arithmetic Operators)
65All of the numbers and arithmetic operators are available on this layer. Some
66keys are duplicated for the convenience of their positions. The `0` and `$`
67keys at the far left are for quick access to beginning and end of line in vim.
68```
69 ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
70 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | Bksp |
71 |---------`------`------`------`------`------`------`------`------`------`------`------`------|
72 | $ | 4 | 5 | 6 | . | + | . | 4 | 5 | 6 | * | "|" |
73 |----------`------`------`------`------`------`------`------`------`------`------`------------|
74 | = | 7 | 8 | 9 | 0 | - | . | 1 | 2 | 3 | / | \ |
75 |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------|
76 | Brite | | | | | | | Prev | Next | Mute |
77 `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
78```
79
80## TouchCursor layer plus personal customizations
81[TouchCursor](http://martin-stone.github.io/touchcursor/) uses the `Space` key
82as the modifier, with the `IJKL` home row keys representing the inverted-T of
83the arrow keys. All of the default TouchCursor keymappings for the right hand
84are represented below. My personalizations include all of the keys shown for
85the left hand. Having the `Alt` and `Shift` keys (as well as the `Control` key
86from the base layers) readily accessible from the home row allows quick word
87jumps and highlighting when used in conjunction with the arrow keys. The
88`Alt-Tab` macro is not only useful under Windows, but also under Mac when used
89with alternative switchers like [HyperSwitch](https://bahoom.com/hyperswitch).
90The `Cmd-Tab` and `Ctrl-Tab` sequences are duplicated for easy access while in
91this layer. The `KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, KC_FIND,` and `KC_AGAIN`
92keycodes do not seem to work. There are macros in place that'll "automatically"
93choose the correct version (`Cmd-Tab` vs. `Alt-Tab`, `Cmd-C` vs. `Ctrl-C`,
94etc.) depending on which layout you've currently selected (`AG_NORM` or
95`AG_SWAP`) in the `_ADJUST` layer. The `Desk_L` and `Desk_R` macros are what I
96use to switch between Virtual Desktops Left/Right. The `Tab_C`, `Tab_N` and
97`Tab_R` are for "Close Tab," "New Tab" and "Reopen Closed Tab" for apps such as
98Google Chrome.
99```
100 ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
101 | AltTab |CmdTab|CtlTab| GUI |Shift | ~ |Insert| Home | Up | End | Bksp | | |
102 |---------`------`------`------`------`------`------`------`------`------`------`------`------|
103 | | Alt |Space |Tab_C | Find |Again | PgUp | Left | Down |Right |Desk_L| Desk_R |
104 |----------`------`------`------`------`------`------`------`------`------`------`------------|
105 | | Undo | Cut | Copy |Paste | ` | PgDn | Del |Tab_N |Tab_R |iTerm2| |
106 |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------|
107 | | | | | | | | | | |
108 `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
109```
110
111## Mouse Layer
112The Mouse layer, closely mimics the layout/behaviour of the TouchCursor layer.
113The `D` key (on QWERTY) is used to activate this layer. All 16 keycodes for the
114mouse from the `doc/keycode.txt` file are represented, and logically located,
115IMHO. The left and right click buttons are duplicated; on the right hand side,
116for a quick click here and there, and again on the left hand side for when the
117buttons need to be held for dragging things or highlighting text, thus allowing
118the right hand to be free to use the up/down/left/right actions.
119```
120 ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
121 | | |ACCL0 | | | | |WHL_L | Up |WHL_R | BTN2 | | |
122 |---------`------`------`------`------`------`------`------`------`------`------`------`------|
123 | |ACCL2 | BTN2 | | BTN1 |ACCL1 |WHL_Up| Left | Down |Right | BTN4 | BTN5 |
124 |----------`------`------`------`------`------`------`------`------`------`------`------------|
125 | | | | | BTN3 | |WHL_Dn| BTN1 | | | BTN3 | |
126 |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------|
127 | | | | | | | | | | |
128 `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
129```