aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ramsay <34961240+ramsayjp@users.noreply.github.com>2018-01-02 09:35:32 +1100
committerJack Humbert <jack.humb@gmail.com>2018-01-01 17:35:32 -0500
commitd6215ad6aff3857cea8a6877b56a547a76ab13ac (patch)
tree3b9af48e30a10f86ce80c8a14105e6f155229357
parenteba4cb7a0437c115c56dfe1796a76c69a99c4d4f (diff)
downloadqmk_firmware-d6215ad6aff3857cea8a6877b56a547a76ab13ac.tar.gz
qmk_firmware-d6215ad6aff3857cea8a6877b56a547a76ab13ac.zip
Aviator Keymap (#2204)
* Create aviator.txt * Add files via upload * Delete aviator.txt * Delete readme.md * Add files via upload * Update readme.md * Update readme.md * Delete keyboard-layout.png * Update readme.md * Update readme.md * Update readme.md
-rw-r--r--keyboards/planck/keymaps/aviator/config.h44
-rw-r--r--keyboards/planck/keymaps/aviator/keyboard-layout.json138
-rw-r--r--keyboards/planck/keymaps/aviator/keymap.c198
-rw-r--r--keyboards/planck/keymaps/aviator/readme.md68
-rw-r--r--keyboards/planck/keymaps/aviator/rules.mk1
5 files changed, 449 insertions, 0 deletions
diff --git a/keyboards/planck/keymaps/aviator/config.h b/keyboards/planck/keymaps/aviator/config.h
new file mode 100644
index 000000000..6bc53cf57
--- /dev/null
+++ b/keyboards/planck/keymaps/aviator/config.h
@@ -0,0 +1,44 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "config_common.h"
5
6#define BACKLIGHT_BREATHING
7
8#ifdef AUDIO_ENABLE
9 #define STARTUP_SONG SONG(PLANCK_SOUND)
10 // #define STARTUP_SONG SONG(NO_SOUND)
11
12 #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
13 SONG(COLEMAK_SOUND), \
14 SONG(DVORAK_SOUND) \
15 }
16#endif
17
18#define MUSIC_MASK (keycode != KC_NO)
19
20/*
21 * MIDI options
22 */
23
24/* Prevent use of disabled MIDI features in the keymap */
25//#define MIDI_ENABLE_STRICT 1
26
27/* enable basic MIDI features:
28 - MIDI notes can be sent when in Music mode is on
29*/
30
31#define MIDI_BASIC
32
33/* enable advanced MIDI features:
34 - MIDI notes can be added to the keymap
35 - Octave shift and transpose
36 - Virtual sustain, portamento, and modulation wheel
37 - etc.
38*/
39//#define MIDI_ADVANCED
40
41/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
42//#define MIDI_TONE_KEYCODE_OCTAVES 2
43
44#endif
diff --git a/keyboards/planck/keymaps/aviator/keyboard-layout.json b/keyboards/planck/keymaps/aviator/keyboard-layout.json
new file mode 100644
index 000000000..84af51859
--- /dev/null
+++ b/keyboards/planck/keymaps/aviator/keyboard-layout.json
@@ -0,0 +1,138 @@
1[
2 {
3 "name": "The Aviator",
4 "author": "John Ramsay",
5 "notes": "Designed for aeronautical data entry on the OLKB Planck.",
6 "switchMount": "cherry",
7 "switchBrand": "gateron",
8 "switchType": "KS-3-Green",
9 "plate": true
10 },
11 [
12 {
13 "c": "#ADADAD",
14 "t": "#000000\n#3f76d4\n#d67509"
15 },
16 "\nDel\nDel\n\n\n\n\n\n\nEsc",
17 {
18 "c": "#CDC1B0"
19 },
20 "\n!\nF1\n\n\n\n\n\n\nQ",
21 "\n@\nF2\n\n\n\n\n\n\nW",
22 "\n#\nF3\n\n\n\n\n\n\nE",
23 "\n$\nF4\n\n\n\n\n\n\nR",
24 "\n%\n\n\n\n\n\n\n\nT",
25 "\n^\nN\n\n\n\n\n\n\nY",
26 "\n&\nS\n\n\n\n\n\n\nU",
27 "\n*\n7\n\n\n\n\n\n\nI",
28 "\n(\n8\n\n\n\n\n\n\nO",
29 "\n)\n9\n\n\n\n\n\n\nP",
30 {
31 "c": "#ADADAD",
32 "t": "#000000",
33 "a": 7
34 },
35 "Back Space"
36 ],
37 [
38 "Tab",
39 {
40 "c": "#CDC1B0",
41 "t": "#000000\n#3f76d4\n#d67509",
42 "a": 4
43 },
44 "\n~\nF5\n\n\n\n\n\n\nA",
45 "\n`\nF6\n\n\n\n\n\n\nS",
46 {
47 "t": "#000000\n\n#d67509"
48 },
49 "\n\nF7\n\n\n\n\n\n\nD",
50 "\n\nF8\n\n\n\n\n\n\nF",
51 {
52 "t": "#000000",
53 "a": 7
54 },
55 "G",
56 {
57 "t": "#000000\n\n#d67509",
58 "a": 4
59 },
60 "\n\nE\n\n\n\n\n\n\nH",
61 {
62 "t": "#000000\n#3f76d4\n#d67509"
63 },
64 "\n_\nW\n\n\n\n\n\n\nJ",
65 "\n+\n4\n\n\n\n\n\n\nK",
66 "\n{\n5\n\n\n\n\n\n\nL",
67 "\n}\n6\n\n\n\n\n\n\n:\n;",
68 "\n\\\nTab\n\n\n\n\n\n\n\"\n'"
69 ],
70 [
71 {
72 "c": "#ADADAD",
73 "t": "#000000",
74 "a": 7
75 },
76 "Shift",
77 {
78 "c": "#CDC1B0",
79 "t": "#000000\n\n#d67509",
80 "a": 4
81 },
82 "\n\nF9\n\n\n\n\n\n\nZ",
83 "\n\nF10\n\n\n\n\n\n\nX",
84 "\n\nF11\n\n\n\n\n\n\nC",
85 "\n\nF12\n\n\n\n\n\n\nV",
86 {
87 "t": "#000000",
88 "a": 7
89 },
90 "B",
91 {
92 "t": "#000000\n\n#d67509",
93 "a": 4
94 },
95 "\n\n+\n\n\n\n\n\n\nN",
96 {
97 "t": "#000000\n#3f76d4\n#d67509"
98 },
99 "\n-\n-\n\n\n\n\n\n\nM",
100 "\n=\n1\n\n\n\n\n\n\n<\n,",
101 "\n[\n2\n\n\n\n\n\n\n>\n.",
102 "\n]\n3\n\n\n\n\n\n\n?\n/",
103 {
104 "c": "#ADADAD",
105 "t": "#000000",
106 "a": 7
107 },
108 "Return"
109 ],
110 [
111 "Fn",
112 "Ctrl",
113 "Alt",
114 "Meta",
115 {
116 "c": "#9FACBF"
117 },
118 "&dArr;",
119 {
120 "c": "#CDC1B0"
121 },
122 "",
123 "",
124 {
125 "c": "#E5A65B"
126 },
127 "&uArr;",
128 {
129 "c": "#ADADAD",
130 "t": "#000000\n#3f76d4\n#d67509",
131 "a": 4
132 },
133 "\nHome\n0\n\n\n\n\n\n\n&larr;",
134 "\nPDwn\n.\n\n\n\n\n\n\n&darr;",
135 "\nPUp\nShift\n\n\n\n\n\n\n&uarr;",
136 "\nEnd\nReturn\n\n\n\n\n\n\n&rarr;"
137 ]
138] \ No newline at end of file
diff --git a/keyboards/planck/keymaps/aviator/keymap.c b/keyboards/planck/keymaps/aviator/keymap.c
new file mode 100644
index 000000000..97d2bd063
--- /dev/null
+++ b/keyboards/planck/keymaps/aviator/keymap.c
@@ -0,0 +1,198 @@
1/* Copyright 2017 John Ramsay
2 * Aviator Keymap v1.0
3 *
4 * Designed for aeronautical data entry on the OLKB Planck.
5 */
6
7 #include "planck.h"
8 #include "action_layer.h"
9
10 extern keymap_config_t keymap_config;
11
12 enum planck_layers {
13 _QWERTY,
14 _DATA,
15 _LOWER,
16 _RAISE,
17 _ADJUST
18 };
19
20 enum planck_keycodes {
21 QWERTY = SAFE_RANGE,
22 DATA,
23 LOWER,
24 RAISE,
25 BACKLIT
26 };
27
28#define _______ KC_TRNS
29#define ___x___ KC_NO
30
31const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
32
33/* Qwerty
34 * ,-----------------------------------------------------------------------------------.
35 * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp |
36 * |------+------+------+------+------+-------------+------+------+------+------+------|
37 * | Tab | A | S | D | F | G | H | J | K | L | ; | " |
38 * |------+------+------+------+------+------|------+------+------+------+------+------|
39 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
40 * |------+------+------+------+------+------+------+------+------+------+------+------|
41 * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
42 * `-----------------------------------------------------------------------------------'
43 */
44[_QWERTY] = {
45 {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
46 {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
47 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
48 {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
49},
50
51/* Data
52 * ,-----------------------------------------------------------------------------------.
53 * | Esc | Home | Up | End | | | N | S | 7 | 8 | 9 | Bksp |
54 * |------+------+------+------+------+-------------+------+------+------+------+------|
55 * | Tab | Left | Down | Right| | | E | W | 4 | 5 | 6 | Tab |
56 * |------+------+------+------+------+------|------+------+------+------+------+------|
57 * | Shift| Z | X | C | V | | + | - | 1 | 2 | 3 |Enter |
58 * |------+------+------+------+------+------+------+------+------+------+------+------|
59 * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | 0 | . |Shift |Enter |
60 * `-----------------------------------------------------------------------------------'
61 */
62[_DATA] = {
63 {KC_ESC, KC_HOME, KC_UP, KC_END, ___x___, ___x___, KC_N, KC_S, KC_7, KC_8, KC_9, KC_BSPC},
64 {KC_TAB, KC_LEFT, KC_DOWN, KC_RIGHT, ___x___, ___x___, KC_E, KC_W, KC_4, KC_5, KC_6, KC_TAB},
65 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, ___x___, KC_PLUS, KC_MINS, KC_1, KC_2, KC_3, KC_ENT},
66 {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_0, KC_DOT, KC_RSFT, KC_ENT}
67},
68
69/* Lower
70 * ,-----------------------------------------------------------------------------------.
71 * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
72 * |------+------+------+------+------+-------------+------+------+------+------+------|
73 * | | ~ | ` | | | | | _ | + | { | } | \ |
74 * |------+------+------+------+------+------|------+------+------+------+------+------|
75 * | | | | | | | | - | = | [ | ] | |
76 * |------+------+------+------+------+------+------+------+------+------+------+------|
77 * | | | | | | | | Home |Pg Dn |Pg Up | End |
78 * `-----------------------------------------------------------------------------------'
79 */
80[_LOWER] = {
81 {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
82 {_______, KC_TILD, KC_GRV, ___x___, ___x___, ___x___, ___x___, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSLS},
83 {_______, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______},
84 {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
85},
86
87/* Raise
88 * ,-----------------------------------------------------------------------------------.
89 * | Del | F1 | F2 | F3 | F4 | | N | S | 7 | 8 | 9 | Bksp |
90 * |------+------+------+------+------+-------------+------+------+------+------+------|
91 * | | F5 | F6 | F7 | F8 | | E | W | 4 | 5 | 6 | Tab |
92 * |------+------+------+------+------+------|------+------+------+------+------+------|
93 * | | F9 | F10 | F11 | F12 | | + | - | 1 | 2 | 3 | |
94 * |------+------+------+------+------+------+------+------+------+------+------+------|
95 * | | | | | | | | 0 | . |Shift |Enter |
96 * `-----------------------------------------------------------------------------------'
97 */
98[_RAISE] = {
99 {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, ___x___, KC_N, KC_S, KC_7, KC_8, KC_9, KC_BSPC},
100 {_______, KC_F5, KC_F6, KC_F7, KC_F8, ___x___, KC_E, KC_W, KC_4, KC_5, KC_6, KC_TAB},
101 {_______, KC_F9, KC_F10, KC_F11, KC_F12, ___x___, KC_PLUS, KC_MINS, KC_1, KC_2, KC_3, _______,},
102 {_______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_RSFT, KC_ENT}
103},
104
105/* Adjust (Lower + Raise)
106 * ,-----------------------------------------------------------------------------------.
107 * | Esc | Reset| Debug| | | | | | | | | Del |
108 * |------+------+------+------+------+-------------+------+------+------+------+------|
109 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| Data | | | |
110 * |------+------+------+------+------+------|------+------+------+------+------+------|
111 * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
112 * |------+------+------+------+------+------+------+------+------+------+------+------|
113 * | | | | | | | | | | | |
114 * `-----------------------------------------------------------------------------------'
115 */
116[_ADJUST] = {
117 {KC_ESC, RESET, DEBUG, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, KC_DEL},
118 {_______, ___x___, ___x___, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, DATA, ___x___, ___x___, _______},
119 {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, ___x___, ___x___, ___x___, ___x___, _______},
120 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
121}
122};
123
124bool process_record_user(uint16_t keycode, keyrecord_t *record) {
125 switch (keycode) {
126 case QWERTY:
127 if (record->event.pressed) {
128 set_single_persistent_default_layer(_QWERTY);
129 breathing_self_disable();
130 }
131 return false;
132 break;
133 case DATA:
134 if (record->event.pressed) {
135 set_single_persistent_default_layer(_DATA);
136 #ifdef BACKLIGHT_ENABLE
137 breathing_speed_set(3);
138 breathing_enable();
139 #endif
140 }
141 return false;
142 break;
143 case LOWER:
144 if (record->event.pressed) {
145 layer_on(_LOWER);
146 uint8_t default_layer = biton32(default_layer_state);
147 if (default_layer == _QWERTY) {
148 #ifdef BACKLIGHT_ENABLE
149 breathing_speed_set(3);
150 breathing_enable();
151 #endif
152 }
153 update_tri_layer(_LOWER, _RAISE, _ADJUST);
154 } else {
155 layer_off(_LOWER);
156 uint8_t default_layer = biton32(default_layer_state);
157 if (default_layer == _QWERTY) {
158 breathing_self_disable();
159 }
160 update_tri_layer(_LOWER, _RAISE, _ADJUST);
161 }
162 return false;
163 break;
164 case RAISE:
165 if (record->event.pressed) {
166 layer_on(_RAISE);
167 uint8_t default_layer = biton32(default_layer_state);
168 if (default_layer == _QWERTY) {
169 #ifdef BACKLIGHT_ENABLE
170 breathing_speed_set(3);
171 breathing_enable();
172 #endif
173 }
174 update_tri_layer(_LOWER, _RAISE, _ADJUST);
175 } else {
176 layer_off(_RAISE);
177 uint8_t default_layer = biton32(default_layer_state);
178 if (default_layer == _QWERTY) {
179 breathing_self_disable();
180 }
181 update_tri_layer(_LOWER, _RAISE, _ADJUST);
182 }
183 return false;
184 break;
185 case BACKLIT:
186 if (record->event.pressed) {
187 register_code(KC_RSFT);
188 #ifdef BACKLIGHT_ENABLE
189 backlight_step();
190 #endif
191 } else {
192 unregister_code(KC_RSFT);
193 }
194 return false;
195 break;
196 }
197 return true;
198}
diff --git a/keyboards/planck/keymaps/aviator/readme.md b/keyboards/planck/keymaps/aviator/readme.md
new file mode 100644
index 000000000..3319c7fe1
--- /dev/null
+++ b/keyboards/planck/keymaps/aviator/readme.md
@@ -0,0 +1,68 @@
1# The Aviator
2
3Designed for aeronautical data entry on the OLKB Planck.
4
5![Imgur](https://i.imgur.com/lj6uMYI.png)
6
7## Layers
8
9````
10Qwerty
11,-----------------------------------------------------------------------------------.
12| Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp |
13|------+------+------+------+------+-------------+------+------+------+------+------|
14| Tab | A | S | D | F | G | H | J | K | L | ; | " |
15|------+------+------+------+------+------|------+------+------+------+------+------|
16| Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
17|------+------+------+------+------+------+------+------+------+------+------+------|
18| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
19`-----------------------------------------------------------------------------------'
20
21Data
22,-----------------------------------------------------------------------------------.
23| Esc | Home | Up | End | | | N | S | 7 | 8 | 9 | Bksp |
24|------+------+------+------+------+-------------+------+------+------+------+------|
25| Tab | Left | Down | Right| | | E | W | 4 | 5 | 6 | Tab |
26|------+------+------+------+------+------|------+------+------+------+------+------|
27| Shift| Z | X | C | V | | + | - | 1 | 2 | 3 |Enter |
28|------+------+------+------+------+------+------+------+------+------+------+------|
29| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | 0 | . |Shift |Enter |
30`-----------------------------------------------------------------------------------'
31
32Lower
33,-----------------------------------------------------------------------------------.
34| Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
35|------+------+------+------+------+-------------+------+------+------+------+------|
36| | ~ | ` | | | | | _ | + | { | } | \ |
37|------+------+------+------+------+------|------+------+------+------+------+------|
38| | | | | | | | - | = | [ | ] | |
39|------+------+------+------+------+------+------+------+------+------+------+------|
40| | | | | | | | Home |Pg Dn |Pg Up | End |
41`-----------------------------------------------------------------------------------'
42
43Raise
44,-----------------------------------------------------------------------------------.
45| Del | F1 | F2 | F3 | F4 | | N | S | 7 | 8 | 9 | Bksp |
46|------+------+------+------+------+-------------+------+------+------+------+------|
47| | F5 | F6 | F7 | F8 | | E | W | 4 | 5 | 6 | Tab |
48|------+------+------+------+------+------|------+------+------+------+------+------|
49| | F9 | F10 | F11 | F12 | | + | - | 1 | 2 | 3 | |
50|------+------+------+------+------+------+------+------+------+------+------+------|
51| | | | | | | | 0 | . |Shift |Enter |
52`-----------------------------------------------------------------------------------'
53
54Adjust (Lower + Raise)
55,-----------------------------------------------------------------------------------.
56| Esc | Reset| Debug| | | | | | | | | Del |
57|------+------+------+------+------+-------------+------+------+------+------+------|
58| | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| Data | | | |
59|------+------+------+------+------+------|------+------+------+------+------+------|
60| |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
61|------+------+------+------+------+------+------+------+------+------+------+------|
62| | | | | | | | | | | |
63`-----------------------------------------------------------------------------------'
64````
65
66## Notes
67
68Supports LED backlighting.
diff --git a/keyboards/planck/keymaps/aviator/rules.mk b/keyboards/planck/keymaps/aviator/rules.mk
new file mode 100644
index 000000000..bd518d8f2
--- /dev/null
+++ b/keyboards/planck/keymaps/aviator/rules.mk
@@ -0,0 +1 @@
BACKLIGHT_ENABLE = yes