aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/planck/keymaps/espynn/Makefile63
-rw-r--r--keyboards/planck/keymaps/espynn/keyboard-layout.jpgbin0 -> 52908 bytes
-rw-r--r--keyboards/planck/keymaps/espynn/keymap.c151
-rw-r--r--keyboards/planck/keymaps/espynn/layout.json271
-rw-r--r--keyboards/planck/keymaps/espynn/readme.md18
5 files changed, 503 insertions, 0 deletions
diff --git a/keyboards/planck/keymaps/espynn/Makefile b/keyboards/planck/keymaps/espynn/Makefile
new file mode 100644
index 000000000..44a030ba3
--- /dev/null
+++ b/keyboards/planck/keymaps/espynn/Makefile
@@ -0,0 +1,63 @@
1#----------------------------------------------------------------------------
2# On command line:
3#
4# make all = Make software.
5#
6# make clean = Clean out built project files.
7#
8# make coff = Convert ELF to AVR COFF.
9#
10# make extcoff = Convert ELF to AVR Extended COFF.
11#
12# make program = Download the hex file to the device.
13# Please customize your programmer settings(PROGRAM_CMD)
14#
15# make teensy = Download the hex file to the device, using teensy_loader_cli.
16# (must have teensy_loader_cli installed).
17#
18# make dfu = Download the hex file to the device, using dfu-programmer (must
19# have dfu-programmer installed).
20#
21# make flip = Download the hex file to the device, using Atmel FLIP (must
22# have Atmel FLIP installed).
23#
24# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
25# (must have dfu-programmer installed).
26#
27# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
28# (must have Atmel FLIP installed).
29#
30# make debug = Start either simulavr or avarice as specified for debugging,
31# with avr-gdb or avr-insight as the front end for debugging.
32#
33# make filename.s = Just compile filename.c into the assembler code only.
34#
35# make filename.i = Create a preprocessed source file for use in submitting
36# bug reports to the GCC project.
37#
38# To rebuild project do "make clean" then "make all".
39#----------------------------------------------------------------------------
40
41# Build Options
42# change to "no" to disable the options, or define them in the makefile.mk in
43# the appropriate keymap folder that will get included automatically
44#
45BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
46MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
47EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
48CONSOLE_ENABLE = no # Console for debug(+400)
49COMMAND_ENABLE = yes # Commands for debug and configuration
50NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
51BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
52MIDI_ENABLE = no # MIDI controls
53AUDIO_ENABLE = no # Audio output on port C6
54UNICODE_ENABLE = no # Unicode
55BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
56RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
57
58# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
59SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
60
61ifndef QUANTUM_DIR
62 include ../../../../Makefile
63endif
diff --git a/keyboards/planck/keymaps/espynn/keyboard-layout.jpg b/keyboards/planck/keymaps/espynn/keyboard-layout.jpg
new file mode 100644
index 000000000..55e5396bf
--- /dev/null
+++ b/keyboards/planck/keymaps/espynn/keyboard-layout.jpg
Binary files differ
diff --git a/keyboards/planck/keymaps/espynn/keymap.c b/keyboards/planck/keymaps/espynn/keymap.c
new file mode 100644
index 000000000..4a3fe32b8
--- /dev/null
+++ b/keyboards/planck/keymaps/espynn/keymap.c
@@ -0,0 +1,151 @@
1#include "planck.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4#ifdef BACKLIGHT_ENABLE
5 #include "backlight.h"
6#endif
7#define PREVENT_STUCK_MODIFIERS
8extern keymap_config_t keymap_config;
9
10// Symbolic names for macro IDs.
11#define _QWERTY 0 // QUERTY layer
12#define _LOWER 1 // Lower layer
13#define _RAISE 2 // Raise layer
14#define _CUSTOM 3 // Custom layer (LOWER + RAISE)
15#define _BL 4 // Backlight
16#define _CUS0 5 // Mobile#
17#define _CUS1 6 // signature
18#define _CUS2 7 // macro 2
19#define _CUS3 8 // macro 3
20#define _CUS4 9 // macro 4
21#define _CUS5 10 // email
22#define _COPY 11 // copy
23#define _PASTE 12 // paste
24#define _CUT 13 // cut
25
26// Macro shortcuts.
27#define QWERTY M(_LOWER)
28#define LOWER M(_LOWER)
29#define RAISE M(_RAISE)
30#define CUSTOM M(_CUSTOM)
31#define BL M(_BL)
32#define CUS0 M(_CUS0)
33#define CUS1 M(_CUS1)
34#define CUS2 M(_CUS2)
35#define CUS3 M(_CUS3)
36#define CUS4 M(_CUS4)
37#define CUS5 M(_CUS5)
38#define COPY M(_COPY)
39#define PASTE M(_PASTE)
40#define CUT M(_CUT)
41
42// Func macro definitions.
43#define LWR_PGDN FUNC(0) // Tap for PgDn, hold for LOWER
44#define RSE_PGUP FUNC(1) // Tap for PgUp, hold for RAISE
45#define CTL_CAPS FUNC(2) // Tap for Caps, hold for Ctrl (DOESN'T SEEM TO WORK)
46#define SFT_ENT FUNC(3) // Tap for Enter, hold for Shift
47#define ZM_NRM FUNC(4) // Zoom normal
48#define ZM_IN FUNC(5) // Zoom out
49#define ZM_OUT FUNC(6) // Zoom in
50
51// Enable these functions using FUNC(n) macro.
52const uint16_t PROGMEM fn_actions[] = {
53 [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_PGDN),
54 [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_PGUP),
55 [2] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_CAPS),
56 [3] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT),
57 [4] = ACTION_MODS_KEY(MOD_LCTL, KC_0),
58 [5] = ACTION_MODS_KEY(MOD_LCTL, KC_MINS),
59 [6] = ACTION_MODS_KEY(MOD_LCTL, KC_PLUS),
60 [7] = ACTION_MODS_KEY(MOD_LCTL, KC_UNDS),
61 };
62
63// This config can be found at Keyboard layout editor site: http://goo.gl/zjXL2l
64const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
65[_QWERTY] = { /* QWERTY */
66 {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
67 {KC_DEL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT},
68 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT},
69 {KC_LCTL, KC_ESC, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
70},
71[_LOWER] = { /* LOWER */
72 {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL},
73 {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
74 {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_QUOT, KC_DQT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
75 {KC_TRNS, ZM_NRM, ZM_IN, ZM_OUT, KC_TRNS, KC_PGDN, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
76},
77[_RAISE] = { /* RAISE */
78 {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
79 {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_LCBR, KC_BSLS, KC_TRNS},
80 {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_PIPE, KC_GRV, KC_TILD, KC_LBRC, KC_LBRC, KC_TRNS, KC_TRNS},
81 {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGUP, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
82},
83[_CUSTOM] = { /* CUSTOM */
84 {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CUS4, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
85 {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CUS0, CUS3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
86 {KC_TRNS, KC_TRNS, CUT, COPY, PASTE, CUS1, CUS5, CUS2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
87 {BL, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
88}
89};
90
91// Set a layer persistantly.
92void persistant_default_layer_set(uint16_t default_layer) {
93 eeconfig_update_default_layer(default_layer);
94 default_layer_set(default_layer);
95}
96
97// Macro actions for each corresponding ID.
98const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
99{
100 switch(id) {
101 case _RAISE: // Raised layer.
102 if (record->event.pressed) {
103 layer_on(_RAISE);
104 update_tri_layer(_LOWER, _RAISE, _CUSTOM);
105 } else {
106 layer_off(_RAISE);
107 update_tri_layer(_LOWER, _RAISE, _CUSTOM);
108 }
109 break;
110 case _LOWER: // Lowered layer.
111 if (record->event.pressed) {
112 layer_on(_LOWER);
113 update_tri_layer(_LOWER, _RAISE, _CUSTOM);
114 } else {
115 layer_off(_LOWER);
116 update_tri_layer(_LOWER, _RAISE, _CUSTOM);
117 }
118 break;
119 case _BL: // Backlight
120 if (record->event.pressed) {
121 register_code(KC_RSFT);
122#ifdef BACKLIGHT_ENABLE
123 backlight_step();
124#endif
125 } else {
126 unregister_code(KC_RSFT);
127 }
128 break;
129 case _CUS0: // enter your mobile# here
130 return MACRODOWN(T(9), T(9), T(9), T(MINS),T(9), T(9), T(9), T(MINS),T(9), T(9), T(9), T(9),END);
131 case _CUS1: // signature line for email
132 return MACRODOWN(T(ENT), T(ENT), T(MINS), T(J), T(W), END);
133 case _CUS2: // Custom macro 2
134 return MACRODOWN( DOWN(KC_LSFT), TYPE(KC_L), UP(KC_LSFT), END );
135 case _CUS3: // custom macro 3
136 return MACRODOWN( DOWN(KC_LSFT), TYPE(KC_F), UP(KC_LSFT), END );
137 case _CUS4: // custom macro 4
138 return MACRODOWN( DOWN(KC_LSFT), TYPE(KC_I), UP(KC_LSFT), END );
139 case _CUS5: // Enter your email here
140 return MACRODOWN( TYPE(KC_F),
141 DOWN(KC_LSFT), TYPE(KC_2), UP(KC_LSFT),
142 TYPE(KC_G), TYPE(KC_M), TYPE(KC_A), TYPE(KC_I), TYPE(KC_L), TYPE(KC_DOT), TYPE(KC_C), TYPE(KC_O), TYPE(KC_M), END );
143 case _CUT: //cut macro
144 return MACRODOWN( DOWN(KC_LCTL), TYPE(KC_X), UP(KC_LCTL), END );
145 case _COPY: // copy macro
146 return MACRODOWN( DOWN(KC_LCTL), TYPE(KC_C), UP(KC_LCTL), END );
147 case _PASTE: // paste macro
148 return MACRODOWN( DOWN(KC_LCTL), TYPE(KC_V), UP(KC_LCTL), END );
149 };
150 return MACRO_NONE;
151} \ No newline at end of file
diff --git a/keyboards/planck/keymaps/espynn/layout.json b/keyboards/planck/keymaps/espynn/layout.json
new file mode 100644
index 000000000..38ccc3452
--- /dev/null
+++ b/keyboards/planck/keymaps/espynn/layout.json
@@ -0,0 +1,271 @@
1[
2 {
3 "backcolor": "#858585",
4 "name": "Planck 40%",
5 "author": "James Folkert",
6 "background": {
7 "name": "Aluminium brushed",
8 "style": "background-image: url('/bg/metal/aluminum_texture1642.jpg');"
9 },
10 "switchMount": "cherry",
11 "switchBrand": "cherry",
12 "switchType": "MX1A-A1xx",
13 "pcb": true,
14 "plate": true
15 },
16 [
17 {
18 "fa": [
19 2,
20 2,
21 0,
22 2
23 ]
24 },
25 "F1\n1\n\n!\n\n\n\n\n\n<i class='kb kb-Tab-2'></i>",
26 "F2\n2\n\n@\n\n\n\n\n\nQ",
27 "F3\n3\n\n#\n\n\n\n\n\nW",
28 "F4\n4\n\n$\n\n\n\n\n\nE",
29 "F5\n5\n\n%\n\n\n\n\n\nR",
30 "F6\n6\n\n^\n\n\n\n\n\nT",
31 "F7\n6\n\n&\n\n\n\n\n\nY",
32 "F8\n8\n\n*\nMacro4\n\n\n\n\nU",
33 "F9\n9\n\n(\n\n\n\n\n\nI",
34 {
35 "fa": [
36 0,
37 0,
38 0,
39 2
40 ]
41 },
42 "F10\n0\n\n)\n\n\n\n\n\nO",
43 {
44 "fa": [
45 2,
46 2,
47 0,
48 2
49 ]
50 },
51 "F11\n-\n\n_\n\n\n\n\n\nP",
52 "F12\n=\n\n+\n\n\n\n\n\n<i class='kb kb-Unicode-BackSpace-DeleteLeft-Big'></i>"
53 ],
54 [
55 {
56 "a": 7,
57 "f": 3
58 },
59 "<i class='mss mss-Unicode-DeleteRight-Big-2'></i>",
60 {
61 "f": 3
62 },
63 "A",
64 {
65 "f": 3
66 },
67 "S",
68 {
69 "f": 3
70 },
71 "D",
72 {
73 "t": "#ff0000",
74 "a": 4,
75 "f": 3
76 },
77 "\n(\n\n\n\n\n\n\n\nF",
78 {
79 "t": "#000000",
80 "f": 3
81 },
82 "\n)\n\n\n\n\n\n\n\nG",
83 {
84 "f": 3
85 },
86 "\n{\n\n\nMacro0\n\n\n\n\nH",
87 {
88 "t": "#ff0000",
89 "f": 3
90 },
91 "\n}\n\n\nMacro3\n\n\n\n\nJ",
92 {
93 "t": "#000000",
94 "f": 3
95 },
96 "{\n\n\n\n\n\n\n\n\nK",
97 {
98 "f": 3
99 },
100 "{\n\n\n\n\n\n\n\n\nL",
101 {
102 "fa": [
103 2,
104 2,
105 2,
106 2,
107 0,
108 0,
109 0,
110 2
111 ]
112 },
113 "\\\n\n|\n\n\n\n\n:\n\n;",
114 {
115 "a": 7,
116 "fa": [
117 9
118 ]
119 },
120 "<i class='mss mss-Unicode-Enter-3'></i>"
121 ],
122 [
123 {
124 "f": 3
125 },
126 "Shift",
127 {
128 "f": 3
129 },
130 "Z",
131 {
132 "f": 3
133 },
134 "X\n\n\n\nCut",
135 {
136 "f": 3
137 },
138 "C\n\n\n\nCopy",
139 {
140 "a": 4,
141 "fa": [
142 2,
143 2,
144 2,
145 2
146 ]
147 },
148 "\\\n[\n|\n{\nPaste\n\n\n\n\nV",
149 "|\n]\n\n}\nMacro1\n\n\n\n\nB",
150 "`\n'\n~\n\"\nMacro5\n\n\n\n\nN",
151 "~\n\"\n\n\nMacro2\n\n\n\n\nM",
152 {
153 "fa": [
154 2,
155 2,
156 2,
157 2,
158 0,
159 0,
160 0,
161 1
162 ]
163 },
164 "[\n\n{\n\n\n\n\n<\n\n,",
165 "[\n\n{\n\n\n\n\n\n\n.",
166 {
167 "a": 6
168 },
169 "\n\n?\n\n\n\n\n\n/",
170 {
171 "a": 4,
172 "fa": [
173 2,
174 2,
175 2,
176 0,
177 0,
178 0,
179 0,
180 1,
181 9,
182 0
183 ]
184 },
185 "\n\n\n<i class='kb kb-Arrows-Bottom-4'></i>Shift\n\n\n\n\n<i class='mss mss-Unicode-Enter-3'></i>\n\n<i class='kb kb-Arrows-Bottom-4'></i>Shift"
186 ],
187 [
188 {
189 "a": 7,
190 "f": 3
191 },
192 "Ctrl\n\n\n\nBLight",
193 {
194 "a": 4,
195 "fa": [
196 2,
197 1,
198 2,
199 0,
200 0,
201 0,
202 0,
203 1,
204 9,
205 9
206 ]
207 },
208 "\nZNorm\n\n\nRESET\n\n\n\n\n<i class='mss mss-Unicode-Escape-3'></i>",
209 {
210 "fa": [
211 2,
212 1,
213 2,
214 0,
215 0,
216 0,
217 0,
218 1,
219 9,
220 6
221 ]
222 },
223 "\nZIn\n\n\n\n\n\n\n\n<i class='kb kb-logo-windows-8'></i>",
224 {
225 "fa": [
226 2,
227 1,
228 2,
229 0,
230 0,
231 0,
232 0,
233 1,
234 9,
235 9
236 ]
237 },
238 "\nZOut\n\n\n\n\n\n\n\n<i class='kb kb-Unicode-Alternate-1'></i>",
239 {
240 "a": 7,
241 "fa": [
242 9
243 ]
244 },
245 "&dArr;",
246 {
247 "a": 4,
248 "fa": [
249 9,
250 5,
251 5
252 ],
253 "w": 2
254 },
255 "\n<i class='kb kb-Unicode-Page-Down-3'></i>\n<i class='kb kb-Unicode-Page-Up-3'></i>",
256 {
257 "a": 7
258 },
259 "&uArr;",
260 {
261 "a": 4,
262 "fa": [
263 2
264 ]
265 },
266 "<i class='kb kb-Multimedia-FastForward-End'></i>\n\n\n\n\n\n\n\n\n&larr;",
267 "<i class='kb kb-Multimedia-Volume-Down-1'></i>\n\n\n\n\n\n\n\n\n&darr;",
268 "<i class='kb kb-Multimedia-Volume-Up-1'></i>\n\n\n\n\n\n\n\n\n&uarr;",
269 "<i class='kb kb-Multimedia-Play-Pause'></i>\n\n\n\n\n\n\n\n\n&rarr;"
270 ]
271] \ No newline at end of file
diff --git a/keyboards/planck/keymaps/espynn/readme.md b/keyboards/planck/keymaps/espynn/readme.md
new file mode 100644
index 000000000..8882f4601
--- /dev/null
+++ b/keyboards/planck/keymaps/espynn/readme.md
@@ -0,0 +1,18 @@
1# Espynn's keymap for Planck Ortholinear 40% Mechanical Keyboard
2Created by James Folkert: https://twitter.com/trekloFsemaJ
3Added several custom functions to the keymap from the "ab" map. Special thanks to "mollat" for demonstration of macros in their keymap.c
4
5
6![Layout](keyboard-layout.png "Practical Keymap")
7
8
9* Online keyboard layout editor: http://www.keyboard-layout-editor.com/
10* [JSON of raw layout] (layout.json "JSON of raw layout")
11
12# Notes
13* Simultaneous RAISE+LOWER enters CUSTOM layer. Several custom keymaps are here
14* I disregarded the advice of Jack and used macros for passwords. I accept my fate. These have been abstracted to macros 2, 3, and 4
15* add your mobile and email to the keymap before make
16* RAISE and LOWER also acts as PgUp and PgDn when tapped.
17* [CapsLock] also acts as [Ctrl] key when you press and hold. It is convenient for GNU Emacs users. (not sure if this works)
18* Bracket/ paran/ brace keys are placed in the center of the keyboard for programmer's convenience. \ No newline at end of file