aboutsummaryrefslogtreecommitdiff
path: root/keyboards/meira
diff options
context:
space:
mode:
authorJames Young <18669334+noroadsleft@users.noreply.github.com>2021-09-23 07:49:02 +0000
committerGitHub <noreply@github.com>2021-09-23 00:49:02 -0700
commit62ef4a9c8a05d52000504eabef0f1d92a74ade86 (patch)
treeac99f640b1c4055f785a59c747ee839bc6761607 /keyboards/meira
parent0fc15f4d30311402bb6dbf74806a0c5ed00cb135 (diff)
downloadqmk_firmware-62ef4a9c8a05d52000504eabef0f1d92a74ade86.tar.gz
qmk_firmware-62ef4a9c8a05d52000504eabef0f1d92a74ade86.zip
Meira Refactor (#14566)
* clean up keyboard header files * use #pragma once include guard * convert tabs to spaces * remove redundant #include statements * update revision references to main header (`../meira.h` -> `meira.h`) * refactor default keymap * use LAYOUT as layout macro reference * use enum statement for layer indexes; make layers contiguous * use four-space indent * update keycode grid alignment * update layout macro aliases * move layout macro aliases to info.json * alias KEYMAP to LAYOUT_ortho_4x12 so the user keymaps don't have to be edited * touch up meira.h There's no Planck MIT layout reference here. * add copyright headers * workaround patch for grahampheath keymap The `matrix_init_kb()` function in `meira.c` calls `backlight_set()`, but the grahampheath keymap disables Backlight to make space for Audio, causing the firmware to fail to compile. This commit wraps the `backlight_set()` call in an ifdef statement, so the call is excluded if Backlight is disabled. * clean up rules.mk inline comments * re-order rules.mk settings * clean up readme.md * correct link to keyboard image * change metadata section to unordered list * spelling corrections * update make instructions and Docs links
Diffstat (limited to 'keyboards/meira')
-rw-r--r--keyboards/meira/featherble/featherble.c16
-rw-r--r--keyboards/meira/featherble/featherble.h24
-rw-r--r--keyboards/meira/info.json4
-rw-r--r--keyboards/meira/keymaps/default/keymap.c459
-rw-r--r--keyboards/meira/meira.c2
-rw-r--r--keyboards/meira/meira.h25
-rw-r--r--keyboards/meira/promicro/promicro.c17
-rw-r--r--keyboards/meira/promicro/promicro.h23
-rw-r--r--keyboards/meira/readme.md25
-rw-r--r--keyboards/meira/rules.mk17
10 files changed, 330 insertions, 282 deletions
diff --git a/keyboards/meira/featherble/featherble.c b/keyboards/meira/featherble/featherble.c
index 560f0db29..63ade2190 100644
--- a/keyboards/meira/featherble/featherble.c
+++ b/keyboards/meira/featherble/featherble.c
@@ -1 +1,17 @@
1/* Copyright 2017 Cole Markham, WoodKeys.click
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
1#include "meira.h" 17#include "meira.h"
diff --git a/keyboards/meira/featherble/featherble.h b/keyboards/meira/featherble/featherble.h
index b7599b994..eab7c639b 100644
--- a/keyboards/meira/featherble/featherble.h
+++ b/keyboards/meira/featherble/featherble.h
@@ -1,9 +1,19 @@
1#ifndef FEATHERBLE_H 1/* Copyright 2017 Cole Markham, WoodKeys.click
2#define FEATHERBLE_H 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 */
3 16
4#include "../meira.h" 17#pragma once
5 18
6#include "quantum.h" 19#include "meira.h"
7
8
9#endif
diff --git a/keyboards/meira/info.json b/keyboards/meira/info.json
index 0e3dd76ef..0e2f12a96 100644
--- a/keyboards/meira/info.json
+++ b/keyboards/meira/info.json
@@ -2,6 +2,10 @@
2 "keyboard_name": "Meira", 2 "keyboard_name": "Meira",
3 "url": "", 3 "url": "",
4 "maintainer": "colemarkham", 4 "maintainer": "colemarkham",
5 "layout_aliases": {
6 "KEYMAP": "LAYOUT_ortho_4x12",
7 "LAYOUT": "LAYOUT_ortho_4x12"
8 },
5 "layouts": { 9 "layouts": {
6 "LAYOUT_ortho_4x12": { 10 "LAYOUT_ortho_4x12": {
7 "layout": [ 11 "layout": [
diff --git a/keyboards/meira/keymaps/default/keymap.c b/keyboards/meira/keymaps/default/keymap.c
index fcb9796d7..c4d6759ea 100644
--- a/keyboards/meira/keymaps/default/keymap.c
+++ b/keyboards/meira/keymaps/default/keymap.c
@@ -17,24 +17,26 @@
17#include "lighting.h" 17#include "lighting.h"
18 18
19#ifdef RGBLIGHT_ENABLE 19#ifdef RGBLIGHT_ENABLE
20//Following line allows macro to read current RGB settings 20// Following line allows macro to read current RGB settings
21extern rgblight_config_t rgblight_config; 21extern rgblight_config_t rgblight_config;
22#endif 22#endif
23 23
24#define _QWERTY 0 24enum layer_names {
25#define _COLEMAK 1 25 _QWERTY,
26#define _DVORAK 2 26 _COLEMAK,
27#define _LOWER 3 27 _DVORAK,
28#define _RAISE 4 28 _LOWER,
29#define _ADJUST 16 29 _RAISE,
30 _ADJUST
31};
30 32
31enum custom_keycodes { 33enum custom_keycodes {
32 QWERTY = SAFE_RANGE, 34 QWERTY = SAFE_RANGE,
33 COLEMAK, 35 COLEMAK,
34 DVORAK, 36 DVORAK,
35 LOWER, 37 LOWER,
36 RAISE, 38 RAISE,
37 ADJUST, 39 ADJUST
38}; 40};
39 41
40#ifdef AUDIO_ENABLE 42#ifdef AUDIO_ENABLE
@@ -42,257 +44,256 @@ enum custom_keycodes {
42float tone_my_startup[][2] = SONG(ODE_TO_JOY); 44float tone_my_startup[][2] = SONG(ODE_TO_JOY);
43float tone_my_goodbye[][2] = SONG(ROCK_A_BYE_BABY); 45float tone_my_goodbye[][2] = SONG(ROCK_A_BYE_BABY);
44 46
45float tone_qwerty[][2] = SONG(QWERTY_SOUND); 47float tone_qwerty[][2] = SONG(QWERTY_SOUND);
46float tone_dvorak[][2] = SONG(DVORAK_SOUND); 48float tone_dvorak[][2] = SONG(DVORAK_SOUND);
47float tone_colemak[][2] = SONG(COLEMAK_SOUND); 49float tone_colemak[][2] = SONG(COLEMAK_SOUND);
48 50
49#endif /* AUDIO_ENABLE */ 51#endif /* AUDIO_ENABLE */
50 52
51// define variables for reactive RGB 53// define variables for reactive RGB
52bool TOG_STATUS = false; 54bool TOG_STATUS = false;
53int RGB_current_mode; 55int RGB_current_mode;
54 56
55const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 57const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
56 /* Qwerty 58 /* Qwerty
57 * ,-----------------------------------------------------------------------------------. 59 * ,-----------------------------------------------------------------------------------.
58 * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | 60 * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp |
59 * |------+------+------+------+------+-------------+------+------+------+------+------| 61 * |------+------+------+------+------+-------------+------+------+------+------+------|
60 * | Tab | A | S | D | F | G | H | J | K | L | ; | ' | 62 * | Tab | A | S | D | F | G | H | J | K | L | ; | ' |
61 * |------+------+------+------+------+------|------+------+------+------+------+------| 63 * |------+------+------+------+------+------|------+------+------+------+------+------|
62 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | 64 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
63 * |------+------+------+------+------+------+------+------+------+------+------+------| 65 * |------+------+------+------+------+------+------+------+------+------+------+------|
64 * |Adjust| Ctrl | Ctrl | Alt |Lower | Cmd |Space |Raise | Left | Down | Up |Right | 66 * |Adjust| Ctrl | Alt | Alt |Lower | Cmd |Space |Raise | Left | Down | Up |Right |
65 * `-----------------------------------------------------------------------------------' 67 * `-----------------------------------------------------------------------------------'
66 */ 68 */
67 [_QWERTY] = KEYMAP( \ 69 [_QWERTY] = LAYOUT( \
68 KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ 70 KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
69 KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ 71 KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
70 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ 72 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \
71 ADJUST, KC_LCTL, KC_LALT, KC_LALT, LOWER, KC_LGUI, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ 73 ADJUST, KC_LCTL, KC_LALT, KC_LALT, LOWER, KC_LGUI, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
72 ), 74 ),
73 75
74 /* Colemak 76 /* Colemak
75 * ,-----------------------------------------------------------------------------------. 77 * ,-----------------------------------------------------------------------------------.
76 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | 78 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
77 * |------+------+------+------+------+-------------+------+------+------+------+------| 79 * |------+------+------+------+------+-------------+------+------+------+------+------|
78 * | Esc | A | R | S | T | D | H | N | E | I | O | " | 80 * | Esc | A | R | S | T | D | H | N | E | I | O | " |
79 * |------+------+------+------+------+------|------+------+------+------+------+------| 81 * |------+------+------+------+------+------|------+------+------+------+------+------|
80 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | 82 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
81 * |------+------+------+------+------+------+------+------+------+------+------+------| 83 * |------+------+------+------+------+------+------+------+------+------+------+------|
82 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | 84 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
83 * `-----------------------------------------------------------------------------------' 85 * `-----------------------------------------------------------------------------------'
84 */ 86 */
85 [_COLEMAK] = KEYMAP( \ 87 [_COLEMAK] = LAYOUT( \
86 KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ 88 KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
87 KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ 89 KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
88 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ 90 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \
89 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ 91 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
90 ), 92 ),
91 93
92 /* Dvorak 94 /* Dvorak
93 * ,-----------------------------------------------------------------------------------. 95 * ,-----------------------------------------------------------------------------------.
94 * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | 96 * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
95 * |------+------+------+------+------+-------------+------+------+------+------+------| 97 * |------+------+------+------+------+-------------+------+------+------+------+------|
96 * | Esc | A | O | E | U | I | D | H | T | N | S | / | 98 * | Esc | A | O | E | U | I | D | H | T | N | S | / |
97 * |------+------+------+------+------+------|------+------+------+------+------+------| 99 * |------+------+------+------+------+------|------+------+------+------+------+------|
98 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | 100 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
99 * |------+------+------+------+------+------+------+------+------+------+------+------| 101 * |------+------+------+------+------+------+------+------+------+------+------+------|
100 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | 102 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
101 * `-----------------------------------------------------------------------------------' 103 * `-----------------------------------------------------------------------------------'
102 */ 104 */
103 [_DVORAK] = KEYMAP( \ 105 [_DVORAK] = LAYOUT( \
104 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ 106 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
105 KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ 107 KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
106 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ 108 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, \
107 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ 109 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
108 ), 110 ),
109 111
110 /* Lower 112 /* Lower
111 * ,-----------------------------------------------------------------------------------. 113 * ,-----------------------------------------------------------------------------------.
112 * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | 114 * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
113 * |------+------+------+------+------+-------------+------+------+------+------+------| 115 * |------+------+------+------+------+-------------+------+------+------+------+------|
114 * | ~ | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | | 116 * | ~ | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | |
115 * |------+------+------+------+------+------|------+------+------+------+------+------| 117 * |------+------+------+------+------+------|------+------+------+------+------+------|
116 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | 118 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
117 * |------+------+------+------+------+------+------+------+------+------+------+------| 119 * |------+------+------+------+------+------+------+------+------+------+------+------|
118 * | | | | | | | | Next | Vol- | Vol+ | Play | 120 * | | | | | | | | | Next | Vol- | Vol+ | Play |
119 * `-----------------------------------------------------------------------------------' 121 * `-----------------------------------------------------------------------------------'
120 */ 122 */
121 [_LOWER] = KEYMAP( \ 123 [_LOWER] = LAYOUT( \
122 _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ 124 _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
123 KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ 125 KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
124 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, KC_QUOT, \ 126 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), _______, _______, KC_QUOT, \
125 _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ 127 _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \
126 ), 128 ),
127 129
128 /* Raise 130 /* Raise
129 * ,-----------------------------------------------------------------------------------. 131 * ,-----------------------------------------------------------------------------------.
130 * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | 132 * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
131 * |------+------+------+------+------+-------------+------+------+------+------+------| 133 * |------+------+------+------+------+-------------+------+------+------+------+------|
132 * | ` | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | 134 * | ` | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
133 * |------+------+------+------+------+------|------+------+------+------+------+------| 135 * |------+------+------+------+------+------|------+------+------+------+------+------|
134 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | 136 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
135 * |------+------+------+------+------+------+------+------+------+------+------+------| 137 * |------+------+------+------+------+------+------+------+------+------+------+------|
136 * | | | | | | | | Home | PgUp | PgDn | End | 138 * | | | | | | | | | Home | PgUp | PgDn | End |
137 * `-----------------------------------------------------------------------------------' 139 * `-----------------------------------------------------------------------------------'
138 */ 140 */
139 [_RAISE] = KEYMAP( \ 141 [_RAISE] = LAYOUT( \
140 _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ 142 _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
141 KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ 143 KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
142 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \ 144 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
143 _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ 145 _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \
144 ), 146 ),
145 147
146 /* Adjust (Lower + Raise) 148 /* Adjust (Lower + Raise)
147 * ,-----------------------------------------------------------------------------------. 149 * ,-----------------------------------------------------------------------------------.
148 * | | Reset| | | | | | | | | | Del | 150 * | | Reset| | | | | | | | | | Del |
149 * |------+------+------+------+------+-------------+------+------+------+------+------| 151 * |------+------+------+------+------+-------------+------+------+------+------+------|
150 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | 152 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
151 * |------+------+------+------+------+------|------+------+------+------+------+------| 153 * |------+------+------+------+------+------|------+------+------+------+------+------|
152 * | | | | | | | | | | | | | 154 * | | | | | | | | | | | | |
153 * |------+------+------+------+------+------+------+------+------+------+------+------| 155 * |------+------+------+------+------+------+------+------+------+------+------+------|
154 * | | | | | | | | | | | | 156 * | | | | | | | | | | | | |
155 * `-----------------------------------------------------------------------------------' 157 * `-----------------------------------------------------------------------------------'
156 */ 158 */
157 [_ADJUST] = KEYMAP( \ 159 [_ADJUST] = LAYOUT( \
158 BL_TOGG, RESET, _______, KC_MRWD, KC_MPLY, KC_MFFD, KC_PSCR, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL, \ 160 BL_TOGG, RESET, _______, KC_MRWD, KC_MPLY, KC_MFFD, KC_PSCR, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL, \
159 BL_STEP, RGB_MOD, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ 161 BL_STEP, RGB_MOD, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
160 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ 162 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
161 _______, KC_PSCR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ 163 _______, KC_PSCR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
162 ) 164 )
163}; 165};
164 166
165// Setting ADJUST layer RGB back to default 167// Setting ADJUST layer RGB back to default
166void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { 168void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
167 if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { 169 if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
168#ifdef RGBLIGHT_ENABLE 170#ifdef RGBLIGHT_ENABLE
169 rgblight_mode(RGB_current_mode); 171 rgblight_mode(RGB_current_mode);
170#endif 172#endif
171 layer_on(layer3); 173 layer_on(layer3);
172 } else { 174 } else {
173 layer_off(layer3); 175 layer_off(layer3);
174 } 176 }
175} 177}
176 178
177bool process_record_user(uint16_t keycode, keyrecord_t *record) { 179bool process_record_user(uint16_t keycode, keyrecord_t *record) {
178 switch (keycode) { 180 switch (keycode) {
179 case QWERTY: 181 case QWERTY:
180 if (record->event.pressed) { 182 if (record->event.pressed) {
181 #ifdef AUDIO_ENABLE 183#ifdef AUDIO_ENABLE
182 PLAY_SONG(tone_qwerty); 184 PLAY_SONG(tone_qwerty);
183 #endif 185#endif
184// persistent_default_layer_set(1UL<<_QWERTY); 186 // persistent_default_layer_set(1UL<<_QWERTY);
185 } 187 }
186 return false; 188 return false;
187 break; 189 break;
188 case COLEMAK: 190 case COLEMAK:
189 if (record->event.pressed) { 191 if (record->event.pressed) {
190 #ifdef AUDIO_ENABLE 192#ifdef AUDIO_ENABLE
191 PLAY_SONG(tone_colemak); 193 PLAY_SONG(tone_colemak);
192 #endif 194#endif
193// persistent_default_layer_set(1UL<<_COLEMAK); 195 // persistent_default_layer_set(1UL<<_COLEMAK);
194 } 196 }
195 return false; 197 return false;
196 break; 198 break;
197 case DVORAK: 199 case DVORAK:
198 if (record->event.pressed) { 200 if (record->event.pressed) {
199 #ifdef AUDIO_ENABLE 201#ifdef AUDIO_ENABLE
200 PLAY_SONG(tone_dvorak); 202 PLAY_SONG(tone_dvorak);
201 #endif
202// persistent_default_layer_set(1UL<<_DVORAK);
203 }
204 return false;
205 break;
206 case LOWER:
207 if (record->event.pressed) {
208 //not sure how to have keyboard check mode and set it to a variable, so my work around
209 //uses another variable that would be set to true after the first time a reactive key is pressed.
210 if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false
211 } else {
212 TOG_STATUS = !TOG_STATUS;
213#ifdef RGBLIGHT_ENABLE
214 rgblight_mode(16);
215#endif 203#endif
204 // persistent_default_layer_set(1UL<<_DVORAK);
216 } 205 }
217 layer_on(_LOWER); 206 return false;
218 update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); 207 break;
219 } else { 208 case LOWER:
209 if (record->event.pressed) {
210 // not sure how to have keyboard check mode and set it to a variable, so my work around
211 // uses another variable that would be set to true after the first time a reactive key is pressed.
212 if (TOG_STATUS) { // TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false
213 } else {
214 TOG_STATUS = !TOG_STATUS;
220#ifdef RGBLIGHT_ENABLE 215#ifdef RGBLIGHT_ENABLE
221 rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change 216 rgblight_mode(16);
222#endif 217#endif
223 TOG_STATUS = false; 218 }
224 layer_off(_LOWER); 219 layer_on(_LOWER);
225 update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); 220 update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
226 }
227 return false;
228 break;
229 case RAISE:
230 if (record->event.pressed) {
231 //not sure how to have keyboard check mode and set it to a variable, so my work around
232 //uses another variable that would be set to true after the first time a reactive key is pressed.
233 if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false
234 } else { 221 } else {
235 TOG_STATUS = !TOG_STATUS;
236#ifdef RGBLIGHT_ENABLE 222#ifdef RGBLIGHT_ENABLE
237 rgblight_mode(15); 223 rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change
238#endif 224#endif
225 TOG_STATUS = false;
226 layer_off(_LOWER);
227 update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
239 } 228 }
240 layer_on(_RAISE); 229 return false;
241 update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); 230 break;
242 } else { 231 case RAISE:
232 if (record->event.pressed) {
233 // not sure how to have keyboard check mode and set it to a variable, so my work around
234 // uses another variable that would be set to true after the first time a reactive key is pressed.
235 if (TOG_STATUS) { // TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false
236 } else {
237 TOG_STATUS = !TOG_STATUS;
243#ifdef RGBLIGHT_ENABLE 238#ifdef RGBLIGHT_ENABLE
244 rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change 239 rgblight_mode(15);
245#endif 240#endif
246 layer_off(_RAISE); 241 }
247 TOG_STATUS = false; 242 layer_on(_RAISE);
248 update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); 243 update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
249 } 244 } else {
250 return false; 245#ifdef RGBLIGHT_ENABLE
251 break; 246 rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change
252 case ADJUST: 247#endif
253 // FIXME add RGB feedback 248 layer_off(_RAISE);
254 if (record->event.pressed) { 249 TOG_STATUS = false;
255 layer_on(_ADJUST); 250 update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
256 } else { 251 }
257 layer_off(_ADJUST); 252 return false;
258 } 253 break;
259 return false; 254 case ADJUST:
260 break; 255 // FIXME add RGB feedback
261 case BL_TOGG: 256 if (record->event.pressed) {
257 layer_on(_ADJUST);
258 } else {
259 layer_off(_ADJUST);
260 }
261 return false;
262 break;
263 case BL_TOGG:
262#ifdef BACKLIGHT_ENABLE 264#ifdef BACKLIGHT_ENABLE
263 if (record->event.pressed) { 265 if (record->event.pressed) {
264 print("Enabling backlight\n"); 266 print("Enabling backlight\n");
265 backlight_init_ports(); 267 backlight_init_ports();
266 } 268 }
267#endif 269#endif
268 return false; 270 return false;
269 break; 271 break;
270 case BL_STEP: 272 case BL_STEP:
271 if (record->event.pressed) { 273 if (record->event.pressed) {
272 print("Stepping backlight\n"); 274 print("Stepping backlight\n");
273#ifdef BACKLIGHT_ENABLE 275#ifdef BACKLIGHT_ENABLE
274 print("Really stepping backlight\n"); 276 print("Really stepping backlight\n");
275 backlight_step(); 277 backlight_step();
276#endif 278#endif
277 279 }
278 } 280 return false;
279 return false; 281 break;
280 break; 282 // led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released
281 //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released
282#ifdef RGBLIGHT_ENABLE 283#ifdef RGBLIGHT_ENABLE
283 case RGB_MOD: 284 case RGB_MOD:
284 if (record->event.pressed) { 285 if (record->event.pressed) {
285 rgblight_mode(RGB_current_mode); 286 rgblight_mode(RGB_current_mode);
286 rgblight_step(); 287 rgblight_step();
287 RGB_current_mode = rgblight_config.mode; 288 RGB_current_mode = rgblight_config.mode;
288 } 289 }
289 return false; 290 return false;
290 break; 291 break;
291#endif 292#endif
292// case BL_INC: 293 // case BL_INC:
293// meira_inc_backlight_level(); 294 // meira_inc_backlight_level();
294// return false; 295 // return false;
295// break; 296 // break;
296 } 297 }
297 return true; 298 return true;
298} 299}
diff --git a/keyboards/meira/meira.c b/keyboards/meira/meira.c
index 7879875db..e900fd0dd 100644
--- a/keyboards/meira/meira.c
+++ b/keyboards/meira/meira.c
@@ -30,7 +30,9 @@ void matrix_init_kb(void)
30#ifdef ISSI_ENABLE 30#ifdef ISSI_ENABLE
31 issi_init(); 31 issi_init();
32#endif 32#endif
33#ifdef BACKLIGHT_ENABLE
33 backlight_set(5); 34 backlight_set(5);
35#endif
34#ifdef WATCHDOG_ENABLE 36#ifdef WATCHDOG_ENABLE
35 // This is done after turning the layer LED red, if we're caught in a loop 37 // This is done after turning the layer LED red, if we're caught in a loop
36 // we should get a flashing red light 38 // we should get a flashing red light
diff --git a/keyboards/meira/meira.h b/keyboards/meira/meira.h
index d96839440..55fccf5de 100644
--- a/keyboards/meira/meira.h
+++ b/keyboards/meira/meira.h
@@ -13,8 +13,7 @@
13 * You should have received a copy of the GNU General Public License 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/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16#ifndef MEIRA_H 16#pragma once
17#define MEIRA_H
18 17
19#include "quantum.h" 18#include "quantum.h"
20#include "issi.h" 19#include "issi.h"
@@ -22,23 +21,17 @@
22void reset_keyboard_kb(void); 21void reset_keyboard_kb(void);
23 22
24// This a shortcut to help you visually see your layout. 23// This a shortcut to help you visually see your layout.
25// The following is an example using the Planck MIT layout
26// The first section contains all of the arguments 24// The first section contains all of the arguments
27// The second converts the arguments into a two-dimensional array 25// The second converts the arguments into a two-dimensional array
28#define LAYOUT_ortho_4x12( \ 26#define LAYOUT_ortho_4x12( \
29 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ 27 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
30 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ 28 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
31 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ 29 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
32 k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ 30 k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
33) \ 31) \
34{ \ 32{ \
35 { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ 33 { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
36 { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ 34 { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
37 { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ 35 { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
38 { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ 36 { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \
39} 37}
40
41#define LAYOUT LAYOUT_ortho_4x12
42
43#endif
44
diff --git a/keyboards/meira/promicro/promicro.c b/keyboards/meira/promicro/promicro.c
index cf579c89b..63ade2190 100644
--- a/keyboards/meira/promicro/promicro.c
+++ b/keyboards/meira/promicro/promicro.c
@@ -1,2 +1,17 @@
1#include "meira.h" 1/* Copyright 2017 Cole Markham, WoodKeys.click
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 */
2 16
17#include "meira.h"
diff --git a/keyboards/meira/promicro/promicro.h b/keyboards/meira/promicro/promicro.h
index 9e6800b49..eab7c639b 100644
--- a/keyboards/meira/promicro/promicro.h
+++ b/keyboards/meira/promicro/promicro.h
@@ -1,8 +1,19 @@
1#ifndef FEATHERBLE_H 1/* Copyright 2017 Cole Markham, WoodKeys.click
2#define FEATHERBLE_H 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 */
3 16
4#include "../meira.h" 17#pragma once
5 18
6#include "quantum.h" 19#include "meira.h"
7
8#endif
diff --git a/keyboards/meira/readme.md b/keyboards/meira/readme.md
index 10c27ee94..716eb7445 100644
--- a/keyboards/meira/readme.md
+++ b/keyboards/meira/readme.md
@@ -1,26 +1,23 @@
1# Meira 1# Meira
2 2
3![Miera](https://imgur.com/kF4MFlW) 3![Meira](https://i.imgur.com/kF4MFlWh.jpeg)
4 4
5A 4x12 ortholinear low-profile keyboard. 5A 4x12 ortholinear low-profile keyboard.
6 6
7Keyboard Maintainer: [Cole Markham](https://github.com/colemarkham) 7* Keyboard Maintainer: [Cole Markham](https://github.com/colemarkham)
8Hardware Supported: Meira/ProMicro, Meira/FeatherBLE 8* Hardware Supported: Meira/ProMicro, Meira/FeatherBLE
9Hardware Availability: [WoodKeys.click](https://woodkeys.click/meira) 9* Hardware Availability: [WoodKeys.click](https://woodkeys.click/meira)
10 10
11Two controllers are support: the Pro Micro, and the Adafruit Feather BLE 32u4. Support for each is defined as a hardware revision subfolder in QMK. Main differences include processor frequencies and matrix pinouts. 11Two controllers are supported: the Pro Micro, and the Adafruit Feather BLE 32u4. Support for each is defined as a hardware revision subfolder in QMK. Main differences include processor frequencies and matrix pinouts.
12 12
13Make example for this keyboard (after setting up your build environment): 13Make examples for this keyboard (after setting up your build environment):
14 14
15 make meira/promicro:default 15 make meira/featherble:default # for Feather BLE 32u4 controllers
16 make meira/promicro:default # for Pro Micro controllers
16 17
17or 18See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
18 19
19 make meira/featherble:default 20Both the Pro Micro and the Feather BLE use the Caterina bootloader, which is typically programmed using avrdude.
20
21See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information on generic QMK configuration and setup.
22
23Both the Pro Micro and the Feather BLE use the Catalina bootloader, which is typically programmed using avrdude.
24 21
25## Matrix 22## Matrix
26 23
@@ -28,4 +25,4 @@ In order to have enough pins for the matrix and other functions, a custom matrix
28 25
29## LED Controller 26## LED Controller
30 27
31The in-switch LEDs are driven by an ISSI LED controller (IS31FL3731). The micro controller communicates with this chip using I2C. Individual LED control is possible, but currently only general backlighting support is implemented. This functionality is located in lighting.c, issi.c, and TWILib.c. \ No newline at end of file 28The in-switch LEDs are driven by an ISSI LED controller (IS31FL3731). The micro controller communicates with this chip using I2C. Individual LED control is possible, but currently only general backlighting support is implemented. This functionality is located in lighting.c, issi.c, and TWILib.c.
diff --git a/keyboards/meira/rules.mk b/keyboards/meira/rules.mk
index 0b8e55b57..29fadda57 100644
--- a/keyboards/meira/rules.mk
+++ b/keyboards/meira/rules.mk
@@ -8,27 +8,26 @@ BOOTLOADER = caterina
8# change yes to no to disable 8# change yes to no to disable
9# 9#
10BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite 10BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
11MOUSEKEY_ENABLE = no # Mouse keys 11MOUSEKEY_ENABLE = no # Mouse keys
12EXTRAKEY_ENABLE = yes # Audio control and System control 12EXTRAKEY_ENABLE = yes # Audio control and System control
13CONSOLE_ENABLE = no # Console for debug 13CONSOLE_ENABLE = no # Console for debug
14COMMAND_ENABLE = no # Commands for debug and configuration 14COMMAND_ENABLE = no # Commands for debug and configuration
15# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE 15# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
16SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend 16SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
17# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work 17# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
18NKRO_ENABLE = no # USB Nkey Rollover 18NKRO_ENABLE = no # USB Nkey Rollover
19UNICODE_ENABLE = no # Unicode 19BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality, also set ISSI_ENABLE below for Meira
20AUDIO_ENABLE = no # Audio output
21RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
22BACKLIGHT_DRIVER = custom 20BACKLIGHT_DRIVER = custom
23BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality, also set ISSI_ENABLE below for Miera 21ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled
24ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled 22RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
23AUDIO_ENABLE = no # Audio output
25 24
26CUSTOM_MATRIX = yes 25CUSTOM_MATRIX = yes
27 26
28#ifeq ($(strip $(ISSI_ENABLE)), yes) 27#ifeq ($(strip $(ISSI_ENABLE)), yes)
29# TMK_COMMON_DEFS += -DISSI_ENABLE 28# TMK_COMMON_DEFS += -DISSI_ENABLE
30#endif 29#endif
31# 30
32#ifeq ($(strip $(WATCHDOG_ENABLE)), yes) 31#ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
33# TMK_COMMON_DEFS += -DWATCHDOG_ENABLE 32# TMK_COMMON_DEFS += -DWATCHDOG_ENABLE
34#endif 33#endif