aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Egstad <jordanegstad@gmail.com>2019-09-30 10:55:02 -0700
committerDrashna Jaelre <drashna@live.com>2019-09-30 10:55:02 -0700
commit8c1b8cf3a39773e9b89158f4ff49effcabe729d8 (patch)
treedaef0d0a0adfe6aa07f8401c74cd3715368eea28
parentcffe671a61e8187b39a508556c7a5b5f04835d24 (diff)
downloadqmk_firmware-8c1b8cf3a39773e9b89158f4ff49effcabe729d8.tar.gz
qmk_firmware-8c1b8cf3a39773e9b89158f4ff49effcabe729d8.zip
[Keymap] Adds Egstad Preonic Profile (#6837)
* setup local build config, created npm build script to speed things up * removed some profiles and gutted readme * began configuring default and lower layout * lower: fixed right arrow and added music toggle * began configuring default and lower layout * changed startup song * updated comment typos * I did that thing where i basically refactored everything :) * Converted 2U key to 1U's * Reorganized and tidied up * Reorganized and tidied up * space now changes layers * updated numbpad * updated readme * removed unwanted files * addressed change requests
-rw-r--r--keyboards/preonic/keymaps/egstad/config.h91
-rw-r--r--keyboards/preonic/keymaps/egstad/keymap.c229
-rw-r--r--keyboards/preonic/keymaps/egstad/readme.md11
-rw-r--r--keyboards/preonic/keymaps/egstad/rules.mk3
4 files changed, 334 insertions, 0 deletions
diff --git a/keyboards/preonic/keymaps/egstad/config.h b/keyboards/preonic/keymaps/egstad/config.h
new file mode 100644
index 000000000..e66743f45
--- /dev/null
+++ b/keyboards/preonic/keymaps/egstad/config.h
@@ -0,0 +1,91 @@
1#pragma once
2#define TAPPING_TERM 200
3#define IGNORE_MOD_TAP_INTERRUPT
4
5
6
7
8
9/* Leader Key
10 ========================================================================== */
11
12// Activates the leader key
13// #define LEADER_PER_KEY_TIMING
14// resets the timeout after each key is tapped
15// #define LEADER_TIMEOUT 240
16
17
18
19
20
21
22/* Autoshifting
23 ========================================================================== */
24
25// This controls how long you have to hold a key before you get the shifted state.
26#define AUTO_SHIFT_TIMEOUT 150
27
28// Do not Auto Shift special keys -_, =+, [{, ]}, ;:, '", ,<, .>, and /?
29// #define NO_AUTO_SHIFT_SPECIAL
30
31// Do not Auto Shift numeric keys, zero through nine.
32#define NO_AUTO_SHIFT_NUMERIC
33
34// Do not Auto Shift alpha characters, which include A through Z.
35// #define NO_AUTO_SHIFT_ALPHA
36
37// Lower the Auto Shift timeout variable (down)
38// KC_ASDN
39
40// Raise the Auto Shift timeout variable (up)
41// KC_ASUP
42
43// Report your current Auto Shift timeout value
44// KC_ASRP
45
46// Turns on the Auto Shift Function
47// KC_ASON
48
49// Turns off the Auto Shift Function
50// KC_ASOFF
51
52// Toggles the state of the Auto Shift feature
53// KC_ASTG
54
55
56#ifdef AUDIO_ENABLE
57 #define STARTUP_SONG SONG(COIN_SOUND)
58 // #define STARTUP_SONG SONG(NO_SOUND)
59
60 #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
61 SONG(COLEMAK_SOUND), \
62 SONG(DVORAK_SOUND) \
63 }
64#endif
65
66#define MUSIC_MASK (keycode != KC_NO)
67
68/*
69 * MIDI options
70 */
71
72/* Prevent use of disabled MIDI features in the keymap */
73//#define MIDI_ENABLE_STRICT 1
74
75/* enable basic MIDI features:
76 - MIDI notes can be sent when in Music mode is on
77*/
78
79#define MIDI_BASIC
80
81/* enable advanced MIDI features:
82 - MIDI notes can be added to the keymap
83 - Octave shift and transpose
84 - Virtual sustain, portamento, and modulation wheel
85 - etc.
86*/
87//#define MIDI_ADVANCED
88
89/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
90//#define MIDI_TONE_KEYCODE_OCTAVES 2
91
diff --git a/keyboards/preonic/keymaps/egstad/keymap.c b/keyboards/preonic/keymaps/egstad/keymap.c
new file mode 100644
index 000000000..07eda6614
--- /dev/null
+++ b/keyboards/preonic/keymaps/egstad/keymap.c
@@ -0,0 +1,229 @@
1#include QMK_KEYBOARD_H
2
3
4
5
6
7
8/* LAYER NAMES
9 ==========================================================================
10 1. To create a layer, define a (readable) name and set layer value
11 2. Under "Layer definitions" section, define keymaps
12 ========================================================================== */
13
14enum layer_names {
15 L_QWERTY,
16 L_LOWER,
17 L_RAISE,
18 L_ADJUST,
19};
20
21
22
23
24/* TAP DANCE
25 ==========================================================================
26 1. Define TD names here
27 2. Register action in tap_dance_actions[]
28 ========================================================================== */
29
30enum {
31 TD_BRC = 0,
32 TD_MIN,
33 TD_GV_ESC,
34 TD_BS
35};
36
37
38
39
40/* CUSTOM KEYMAPS
41 ========================================================================== */
42
43// Tap dances
44#define TD_ESCP TD(TD_GV_ESC) // Tap for grave, twice for escape
45#define TD_MINS TD(TD_MIN) // Tap for minus, twice for equal
46#define TD_BRAC TD(TD_BRC) // Tap for open brace, twice for close
47
48// Layers
49#define LT2_TAB LT(L_RAISE, KC_TAB) // Tap for tab, hold for RAISE
50#define LT2_ENT LT(L_RAISE, KC_ENT) // Tap for enter, hold for RAISE
51#define LT1_BSP LT(L_LOWER, KC_BSPACE) // Tap for backspace, hold for LOWER
52#define LT1_SPC LT(L_LOWER, KC_SPC) // Tap for space, hold for LOWER
53
54// Modifiers
55#define LG_ZMIN LGUI(KC_EQUAL) // Command + plus (zoom in)
56#define LG_ZMOT LGUI(KC_MINUS) // Command + minus (zoom out)
57#define MT_SHFT MT(MOD_RSFT, KC_ENT) // Tap for enter, hold for shift
58#define MT_HILF S(A(KC_LEFT)) // Press for shift + alt + left
59#define MT_HIRT S(A(KC_RGHT)) // Press for shift + alt + right
60#define MT_UNTB S(KC_TAB) // Press for shift + tab
61
62
63
64
65
66
67/* Layer definitions
68 ========================================================================== */
69
70const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
71
72/* QWERTY
73 * ,-----------------------------------------------------------------------------------------------.
74 * | ` ESC | 1 ! | 2 @ | 3 # | 4 $ | 5 % | 6 ^ | 7 & | 8 * | 9 ( | 0 ) | -_ =+ |
75 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
76 * | TB/RS | Q | W | E | R | T | Y | U | I | O | P | [{ }] |
77 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
78 * | BS/LW | A | S | D | F | G | H | J | K | L | ; | ' |
79 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
80 * | SFT | Z | X | C | V | B | N | M | , | . | / | SF/RN |
81 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
82 * | LEADR | | CTL | ALT | CMD | BSP | SP/LW | RN/RS | ← | ↑ | ↓ | → |
83 * `-----------------------------------------------------------------------------------------------
84 */
85
86[L_QWERTY] = LAYOUT_preonic_grid(
87/*01 02 03 04 05 06 07 08 09 10 11 12 */
88 TD_ESCP, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, TD_MINS, \
89 LT2_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, TD_BRAC, \
90 LT1_BSP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
91 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT_SHFT, \
92 LG_ZMOT, LG_ZMIN, KC_LCTL, KC_LALT, KC_LGUI, KC_BSPACE, LT1_SPC, LT2_ENT, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT \
93),
94
95
96
97
98
99
100 /* LOWER
101 * ,-----------------------------------------------------------------------------------------------.
102 * | ASHFT | | | | | | | | | | | BSP |
103 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
104 * | UNTAB | | | | | | | - | + | * | / | |
105 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
106 * | | S+A+← | S+A+→ | | | | | ← | ↑ | ↓ | → | RTN |
107 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
108 * | | | | | | | | [ { | ] } | ( | ) | \ | |
109 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
110 * | | | | | | | >|| | | << | Vol-U | Vol-D | >> |
111 * `-----------------------------------------------------------------------------------------------'
112 */
113
114[L_LOWER] = LAYOUT_preonic_grid(
115/*01 02 03 04 05 06 07 08 09 10 11 12 */
116 KC_ASTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSPACE, \
117 MT_UNTB, _______, _______, _______, _______, _______, _______, KC_MINUS, KC_PLUS, KC_PAST, KC_PSLS, _______, \
118 _______, MT_HILF, MT_HIRT, _______, _______, _______, _______, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, KC_ENTER, \
119 _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_BSLASH, \
120 _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MRWD, KC_VOLU, KC_VOLD, KC_MFFD \
121),
122
123
124
125
126
127
128/* RAISE
129 * ,-----------------------------------------------------------------------------------------------.
130 * | ASHFT | BTSDN | BTSUP | VUP | VDN | | | / | * | ( | ) | |
131 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
132 * | | | | | | | | 7 | 8 | 9 | + | |
133 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
134 * | | | | | | | | 4 | 5 | 6 | - | |
135 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
136 * | CAP | | | | | | | 1 | 2 | 3 | / | |
137 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
138 * | | | | | | | | | 0 | . | , | |
139 * `-----------------------------------------------------------------------------------------------'
140 */
141[L_RAISE] = LAYOUT_preonic_grid(
142/*01 02 03 04 05 06 07 08 09 10 11 12 */
143 KC_ASTG, KC_F1, KC_F2, KC_VOLU, KC_VOLD, _______, _______, KC_PSLS, KC_PAST, KC_LPRN, KC_RPRN, _______, \
144 _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PLUS, _______, \
145 _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_MINUS, _______, \
146 KC_CAPS, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PSLS, _______, \
147 _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_COMM, _______ \
148),
149
150
151
152
153
154
155
156/* Adjust (Raise + Lower together)
157 * ,-----------------------------------------------------------------------------------------------.
158 * | F12 | FN2 | FN3 | FN4 | FN5 | FN6 | FN7 | FN8 | FN9 | F10 | F11 | FN1 |
159 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
160 * | | | | | | | | | | | | |
161 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
162 * | | | | | | | | | | | | |
163 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
164 * | TOG SF| | | | | | | | | | | |
165 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
166 * | DESGN | | | | | | | | | | | |
167 * `-----------------------------------------------------------------------------------------------'
168 */
169
170[L_ADJUST] = LAYOUT_preonic_grid(
171/*01 02 03 04 05 06 07 08 09 10 11 12 */
172 KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \
173 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
174 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
175 KC_ASTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
176 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
177)
178
179};
180
181// this function
182uint32_t layer_state_set_user(uint32_t state) {
183 return update_tri_layer_state(state, L_LOWER, L_RAISE, L_ADJUST);
184}
185
186
187
188
189
190
191/* BLANK
192 * ,-----------------------------------------------------------------------------------------------.
193 * | | | | | | | | | | | | |
194 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
195 * | | | | | | | | | | | | |
196 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
197 * | | | | | | | | | | | | |
198 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
199 * | | | | | | | | | | | | |
200 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
201 * | | | | | | | | | | | | |
202 * `-----------------------------------------------------------------------------------------------'
203 */
204/*
205[L_BLANK] = LAYOUT_preonic_grid(
206 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
207 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
208 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
209 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
210 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
211),
212*/
213
214
215
216
217
218
219/* Tap Dance Definitions
220 ========================================================================== */
221
222qk_tap_dance_action_t tap_dance_actions[] = {
223 // Tap once for Left Brace, twice for Right Brace
224 [TD_BRC] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_RBRC),
225 //Tap once for Minus, twice for Equal
226 [TD_MIN] = ACTION_TAP_DANCE_DOUBLE(KC_MINUS, KC_EQUAL),
227 // Tap once for Grave, tap twice for Escape
228 [TD_GV_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_GRAVE, KC_ESCAPE)
229};
diff --git a/keyboards/preonic/keymaps/egstad/readme.md b/keyboards/preonic/keymaps/egstad/readme.md
new file mode 100644
index 000000000..2c8e095a4
--- /dev/null
+++ b/keyboards/preonic/keymaps/egstad/readme.md
@@ -0,0 +1,11 @@
1# Egstad's Layout
2
3## Build
4
5- Cd into this directory, run `npm start`
6- Cd into root with `npm run qmk`, locate bin file "preonic_rev3_egstad.bin"
7- Drop that bin into QMK Toolbox and flash Keeb
8
9## Learnings
10
11 1. Combos — Don't fuck with 'em. They made my keys feel sticky and increased typos. Would be great on macropad or something tho!
diff --git a/keyboards/preonic/keymaps/egstad/rules.mk b/keyboards/preonic/keymaps/egstad/rules.mk
new file mode 100644
index 000000000..5348bfdf9
--- /dev/null
+++ b/keyboards/preonic/keymaps/egstad/rules.mk
@@ -0,0 +1,3 @@
1SRC += muse.c
2TAP_DANCE_ENABLE = yes
3AUTO_SHIFT_ENABLE = yes