aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFig <fig-r@protonmail.ch>2018-04-30 17:20:05 +0200
committerDrashna Jaelre <drashna@live.com>2018-04-30 08:20:05 -0700
commit43e589aa02379ec932ce530fa7c3e7e918eae7cb (patch)
tree190b499919d6a775dcfb14e3190bc3b9f0ad7d14
parentc76ab936c859d7da1e87d6f6ad4bbec2740fe57f (diff)
downloadqmk_firmware-43e589aa02379ec932ce530fa7c3e7e918eae7cb.tar.gz
qmk_firmware-43e589aa02379ec932ce530fa7c3e7e918eae7cb.zip
Add the fig-r layout to the preonic (#2858)
-rw-r--r--keyboards/preonic/keymaps/fig-r/config.h42
-rw-r--r--keyboards/preonic/keymaps/fig-r/keymap.c210
-rw-r--r--keyboards/preonic/keymaps/fig-r/readme.md9
-rw-r--r--keyboards/preonic/keymaps/fig-r/rules.mk0
4 files changed, 261 insertions, 0 deletions
diff --git a/keyboards/preonic/keymaps/fig-r/config.h b/keyboards/preonic/keymaps/fig-r/config.h
new file mode 100644
index 000000000..dc3a7ba26
--- /dev/null
+++ b/keyboards/preonic/keymaps/fig-r/config.h
@@ -0,0 +1,42 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "config_common.h"
5
6#ifdef AUDIO_ENABLE
7 #define STARTUP_SONG SONG(PREONIC_SOUND)
8 // #define STARTUP_SONG SONG(NO_SOUND)
9
10 #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
11 SONG(COLEMAK_SOUND), \
12 SONG(DVORAK_SOUND) \
13 }
14#endif
15
16#define MUSIC_MASK (keycode != KC_NO)
17
18/*
19 * MIDI options
20 */
21
22/* Prevent use of disabled MIDI features in the keymap */
23//#define MIDI_ENABLE_STRICT 1
24
25/* enable basic MIDI features:
26 - MIDI notes can be sent when in Music mode is on
27*/
28
29#define MIDI_BASIC
30
31/* enable advanced MIDI features:
32 - MIDI notes can be added to the keymap
33 - Octave shift and transpose
34 - Virtual sustain, portamento, and modulation wheel
35 - etc.
36*/
37//#define MIDI_ADVANCED
38
39/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
40//#define MIDI_TONE_KEYCODE_OCTAVES 2
41
42#endif
diff --git a/keyboards/preonic/keymaps/fig-r/keymap.c b/keyboards/preonic/keymaps/fig-r/keymap.c
new file mode 100644
index 000000000..86c87b0ac
--- /dev/null
+++ b/keyboards/preonic/keymaps/fig-r/keymap.c
@@ -0,0 +1,210 @@
1/* Copyright 2015-2017 Fig
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
19enum preonic_layers {
20 _DVORAK,
21 _QWERTY,
22 _LOWER,
23 _RAISE,
24 _ADJUST,
25 _COMMAND
26};
27
28enum preonic_keycodes {
29 DVORAK = SAFE_RANGE,
30 QWERTY,
31 LOWER,
32 RAISE,
33 COMMAND
34};
35
36const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
37
38/* Dvorak
39 * ,-----------------------------------------------------------------------------------.
40 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
41 * |------+------+------+------+------+------+------+------+------+------+------+------|
42 * | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp |
43 * |------+------+------+------+------+------+------+------+------+------+------+------|
44 * | Esc | A | O | E | U | I | D | H | T | N | S | / |
45 * |------+------+------+------+------+------+------+------+------+------+------+------|
46 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
47 * |------+------+------+------+------+------+------+------+------+------+------+------|
48 * | Cmd | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
49 * `-----------------------------------------------------------------------------------'
50 */
51[_DVORAK] = LAYOUT_preonic_grid( \
52 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
53 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
54 KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
55 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, \
56 COMMAND, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
57),
58
59/* Qwerty
60 * ,-----------------------------------------------------------------------------------.
61 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
62 * |------+------+------+------+------+------+------+------+------+------+------+------|
63 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
64 * |------+------+------+------+------+------+------+------+------+------+------+------|
65 * | Esc | A | S | D | F | G | H | J | K | L | ; | ' |
66 * |------+------+------+------+------+------+------+------+------+------+------+------|
67 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
68 * |------+------+------+------+------+------+------+------+------+------+------+------|
69 * | Cmd | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
70 * `-----------------------------------------------------------------------------------'
71 */
72[_QWERTY] = LAYOUT_preonic_grid( \
73 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
74 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
75 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
76 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \
77 COMMAND, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
78),
79
80/* Lower
81 * ,-----------------------------------------------------------------------------------.
82 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
83 * |------+------+------+------+------+------+------+------+------+------+------+------|
84 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
85 * |------+------+------+------+------+------+------+------+------+------+------+------|
86 * | ` | |CtrlS |CtrlY |CtrlZ | | | _ | + | { | } | | |
87 * |------+------+------+------+------+------+------+------+------+------+------+------|
88 * | | |CtrlX |CtrlC |CtrlV | | | | | | | |
89 * |------+------+------+------+------+------+------+------+------+------+------+------|
90 * | | | | | | | | Home | Down | Up | End |
91 * `-----------------------------------------------------------------------------------'
92 */
93[_LOWER] = LAYOUT_preonic_grid( \
94 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
95 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
96 KC_GRV, _______, LCTL(KC_S), LCTL(KC_Y), LCTL(KC_Z), _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
97 _______, _______, LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, _______, _______, _______, _______, \
98 _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDOWN, KC_PGUP, KC_END \
99),
100
101/* Raise
102 * ,-----------------------------------------------------------------------------------.
103 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
104 * |------+------+------+------+------+------+------+------+------+------+------+------|
105 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
106 * |------+------+------+------+------+------+------+------+------+------+------+------|
107 * | ` | | | | | | | - | = | [ | ] | \ |
108 * |------+------+------+------+------+------+------+------+------+------+------+------|
109 * | | | | | | | | | | | | |
110 * |------+------+------+------+------+------+------+------+------+------+------+------|
111 * | | | | | | | | Next | Vol- | Vol+ | Play |
112 * `-----------------------------------------------------------------------------------'
113 */
114[_RAISE] = LAYOUT_preonic_grid( \
115 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
116 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
117 KC_GRV, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
118 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
119 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
120),
121
122/* Adjust (Lower + Raise)
123 * ,-----------------------------------------------------------------------------------.
124 * | | | | | | | | | | | | |
125 * |------+------+------+------+------+------+------+------+------+------+------+------|
126 * | |Reset |Debug | | | | | | | | | |
127 * |------+------+------+------+------+-------------+------+------+------+------+------|
128 * | | |MusMod|AudOn |AudOff|AGNorm|AGSwap|Qwerty|Dvorak| | | |
129 * |------+------+------+------+------+------|------+------+------+------+------+------|
130 * | |Voice-|Voice+|MusOn |MusOff|MidOn |MidOff| | | | | |
131 * |------+------+------+------+------+------+------+------+------+------+------+------|
132 * | | | | | | | | | | | |
133 * `-----------------------------------------------------------------------------------'
134 */
135[_ADJUST] = LAYOUT_preonic_grid( \
136 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
137 _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
138 _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, DVORAK, _______, _______, _______, \
139 _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \
140 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
141),
142
143/* Cmd
144* ,-----------------------------------------------------------------------------------.
145* | | | | | | | | | | | | |
146* |------+------+------+------+------+------+------+------+------+------+------+------|
147* | | | | | | | | | | | | |
148* |------+------+------+------+------+------+------+------+------+------+------+------|
149* | | | | | | | | | | | | |
150* |------+------+------+------+------+------+------+------+------+------+------+------|
151* | | | | | | | | | | | | |
152* |------+------+------+------+------+------+------+------+------+------+------+------|
153* | | | | | | | | | | | |
154* `-----------------------------------------------------------------------------------'
155 */
156[_COMMAND] = LAYOUT_preonic_grid( \
157 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
158 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
159 _______, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, _______, _______, _______, _______, \
160 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
161 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
162)
163
164};
165
166bool process_record_user(uint16_t keycode, keyrecord_t *record) {
167 switch (keycode) {
168 case DVORAK:
169 if (record->event.pressed) {
170 set_single_persistent_default_layer(_DVORAK);
171 }
172 return false;
173 break;
174 case QWERTY:
175 if (record->event.pressed) {
176 set_single_persistent_default_layer(_QWERTY);
177 }
178 return false;
179 break;
180 case LOWER:
181 if (record->event.pressed) {
182 layer_on(_LOWER);
183 update_tri_layer(_LOWER, _RAISE, _ADJUST);
184 } else {
185 layer_off(_LOWER);
186 update_tri_layer(_LOWER, _RAISE, _ADJUST);
187 }
188 return false;
189 break;
190 case RAISE:
191 if (record->event.pressed) {
192 layer_on(_RAISE);
193 update_tri_layer(_LOWER, _RAISE, _ADJUST);
194 } else {
195 layer_off(_RAISE);
196 update_tri_layer(_LOWER, _RAISE, _ADJUST);
197 }
198 return false;
199 break;
200 case COMMAND:
201 if (record->event.pressed) {
202 layer_on(_COMMAND);
203 } else {
204 layer_off(_COMMAND);
205 }
206 return false;
207 break;
208 }
209 return true;
210};
diff --git a/keyboards/preonic/keymaps/fig-r/readme.md b/keyboards/preonic/keymaps/fig-r/readme.md
new file mode 100644
index 000000000..16d752b79
--- /dev/null
+++ b/keyboards/preonic/keymaps/fig-r/readme.md
@@ -0,0 +1,9 @@
1# Fig-r Preonic layout.
2
3Not designed!
4
5Version 1:
6
7Use Dvorak layout by default.
8
9_COMMAND layout is to work with sxhkd.
diff --git a/keyboards/preonic/keymaps/fig-r/rules.mk b/keyboards/preonic/keymaps/fig-r/rules.mk
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/keyboards/preonic/keymaps/fig-r/rules.mk