aboutsummaryrefslogtreecommitdiff
path: root/keyboards/kyria/keymaps
diff options
context:
space:
mode:
authorGerardo L Hidalgo-Cuellar <ghidalgo93@gmail.com>2021-02-04 17:14:11 -0700
committerGitHub <noreply@github.com>2021-02-04 16:14:11 -0800
commit2c94f989953511b61e009f80998aed1eab2eaf70 (patch)
treea52e7aefadd985d946d64c0059b10dbbc53c12d6 /keyboards/kyria/keymaps
parent69315cb64385f6586b362860d277a9917cc5166a (diff)
downloadqmk_firmware-2c94f989953511b61e009f80998aed1eab2eaf70.tar.gz
qmk_firmware-2c94f989953511b61e009f80998aed1eab2eaf70.zip
[Keymap] add ghidalgo93 for kyria (#11663)
* adding kyria/rev1 keymap * adding both hand config * Apply suggestions from code review * Apply suggestions from code review
Diffstat (limited to 'keyboards/kyria/keymaps')
-rw-r--r--keyboards/kyria/keymaps/ghidalgo93/config.h41
-rw-r--r--keyboards/kyria/keymaps/ghidalgo93/keymap.c245
-rw-r--r--keyboards/kyria/keymaps/ghidalgo93/rules.mk4
-rw-r--r--keyboards/kyria/keymaps/thomasbaart/config.h2
4 files changed, 291 insertions, 1 deletions
diff --git a/keyboards/kyria/keymaps/ghidalgo93/config.h b/keyboards/kyria/keymaps/ghidalgo93/config.h
new file mode 100644
index 000000000..c46873c8e
--- /dev/null
+++ b/keyboards/kyria/keymaps/ghidalgo93/config.h
@@ -0,0 +1,41 @@
1/* Copyright 2019 Thomas Baart <thomas@splitkb.com>
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#pragma once
18
19#ifdef OLED_DRIVER_ENABLE
20 #define OLED_DISPLAY_128X64
21#endif
22
23#ifdef RGBLIGHT_ENABLE
24 #define RGBLIGHT_ANIMATIONS
25 #define RGBLIGHT_HUE_STEP 8
26 #define RGBLIGHT_SAT_STEP 8
27 #define RGBLIGHT_VAL_STEP 8
28#endif
29
30// encoder resolution from default 4 to 2
31#define ENCODER_RESOLUTION 2
32
33// If you are using an Elite C rev3 on the slave side, uncomment the lines below:
34// #define SPLIT_USB_DETECT
35// #define NO_USB_STARTUP_CHECK
36
37//allows for either side as the master.
38#define EE_HANDS
39
40
41
diff --git a/keyboards/kyria/keymaps/ghidalgo93/keymap.c b/keyboards/kyria/keymaps/ghidalgo93/keymap.c
new file mode 100644
index 000000000..de5b93223
--- /dev/null
+++ b/keyboards/kyria/keymaps/ghidalgo93/keymap.c
@@ -0,0 +1,245 @@
1/* Copyright 2019 Thomas Baart <thomas@splitkb.com>
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#include QMK_KEYBOARD_H
17
18
19enum layers {
20 _QWERTY = 0,
21 _LOWER,
22 _RAISE,
23 _NAV,
24 _ADJUST
25};
26
27const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
28/*
29 * Base Layer: QWERTY
30 *
31 * ,-------------------------------------------. ,-------------------------------------------.
32 * | ESC | Q | W | E | R | T | | Y | U | I | O | P | | \ |
33 * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
34 * | Ctrl | A | S | D | F | G | | H | J | K | L | ; : | ' " |
35 * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
36 * | LShift | Z | X | C | V | B | | | | | | N | M | , < | . > | / ? | - _ |
37 * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
38 * | | GUI | | Tab | Enter| | Bksp | Space| Alt | Home | End |
39 * | | | LCTL | Lower| | | | Raise| | | |
40 * `----------------------------------' `----------------------------------'
41 */
42 [_QWERTY] = LAYOUT(
43 KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE,
44 KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
45 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, _______, _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS,
46 _______, KC_LGUI , KC_LCTL, LT(_LOWER, KC_TAB), LT(_NAV, KC_ENT), KC_BSPC, LT(_RAISE, KC_SPC), KC_RALT, KC_HOME, KC_END
47 ),
48/*
49 * Lower Layer: Number keys, media
50 *
51 * ,-------------------------------------------. ,-------------------------------------------.
52 * | | | | | | | | | 7 | 8 | 9 | | |
53 * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
54 * | | | Prev | Play | Next | VolUp| | | 4 | 5 | 6 | | |
55 * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
56 * | | | | | Mute | VolDn| | | | | | 0 | 1 | 2 | 3 | | |
57 * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
58 * | | | | | | | | | | | |
59 * | | | | | | | | | | | |
60 * `----------------------------------' `----------------------------------'
61 */
62 [_LOWER] = LAYOUT(
63 _______, _______, _______, _______, _______, _______, _______, KC_7 , KC_8 , KC_9 , _______, _______,
64 _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU, _______, KC_4 , KC_5 , KC_6 , _______, _______,
65 _______, _______, _______, _______, KC_MUTE, KC_VOLD, _______, _______, _______, _______, KC_0 , KC_1 , KC_2 , KC_3 , _______, _______,
66 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
67 ),
68/*
69 * Raise Layer: Symbols
70 *
71 * ,-------------------------------------------. ,-------------------------------------------.
72 * | | @ | ! | { | } | | | ` | ~ | & | * | | |
73 * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
74 * | | # | $ | ( | ) | | | _ | - | = | | | ' " | |
75 * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
76 * | | % | ^ | [ | ] | | | | | | | | + | \ | | | |
77 * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
78 * | | | | | | | | | | | |
79 * | | | | | | | | | | | |
80 * `----------------------------------' `----------------------------------'
81 */
82 [_RAISE] = LAYOUT(
83 _______, KC_AT , KC_EXLM, KC_LCBR, KC_RCBR, _______, KC_GRV , KC_TILD, KC_AMPR, KC_ASTR, _______, _______,
84 _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, _______, KC_UNDS, KC_MINS, KC_EQL , KC_PIPE, KC_QUOT, _______,
85 _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, _______, KC_PLUS, KC_BSLS, _______, _______, _______,
86 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
87 ),
88// /*
89// * Navigation Layer
90// *
91// * ,-------------------------------------------. ,-------------------------------------------.
92// * | | | | | | | | home |pg dn |pg up | end | | |
93// * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
94// * | | | | | | | | left | down | up | right| | |
95// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
96// * | | | | | | | | | | | | | | | | | |
97// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
98// * | | | | | | | | | | | |
99// * | | | | | | | | | | | |
100// * `----------------------------------' `----------------------------------'
101// */
102 [_NAV] = LAYOUT(
103 _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END , _______, _______,
104 _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______, _______,
105 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
106 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
107 ),
108/*
109 * Adjust Layer: Function keys, RGB
110 *
111 * ,-------------------------------------------. ,-------------------------------------------.
112 * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | |
113 * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
114 * | | | | | | | | | | | F11 | F12 | |
115 * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
116 * | | | | | | | | | | | | | | | | | |
117 * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
118 * | | | | | | | | | | | |
119 * | | | | | | | | | | | |
120 * `----------------------------------' `----------------------------------'
121 */
122 [_ADJUST] = LAYOUT(
123 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
124 _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_F11, KC_F12, _______,
125 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
126 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
127 ),
128// /*
129// * Layer template
130// *
131// * ,-------------------------------------------. ,-------------------------------------------.
132// * | | | | | | | | | | | | | |
133// * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
134// * | | | | | | | | | | | | | |
135// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
136// * | | | | | | | | | | | | | | | | | |
137// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
138// * | | | | | | | | | | | |
139// * | | | | | | | | | | | |
140// * `----------------------------------' `----------------------------------'
141// */
142// [_LAYERINDEX] = LAYOUT(
143// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
144// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
145// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
146// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
147// ),
148};
149
150layer_state_t layer_state_set_user(layer_state_t state) {
151 return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
152}
153
154
155#ifdef OLED_DRIVER_ENABLE
156oled_rotation_t oled_init_user(oled_rotation_t rotation) {
157 return OLED_ROTATION_180;
158}
159
160static void render_kyria_logo(void) {
161 static const char PROGMEM kyria_logo[] = {
162 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
163 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
164 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
165 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0,
166 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0,
167 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
168 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
169 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
170 };
171 oled_write_raw_P(kyria_logo, sizeof(kyria_logo));
172}
173
174static void render_qmk_logo(void) {
175 static const char PROGMEM qmk_logo[] = {
176 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
177 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
178 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0};
179
180 oled_write_P(qmk_logo, false);
181}
182
183static void render_status(void) {
184 // QMK Logo and version information
185 render_qmk_logo();
186 oled_write_P(PSTR("Kyria rev1.0\n\n"), false);
187
188 // Host Keyboard Layer Status
189 oled_write_P(PSTR("Layer: "), false);
190 switch (get_highest_layer(layer_state)) {
191 case _QWERTY:
192 oled_write_P(PSTR("Default\n"), false);
193 break;
194 case _LOWER:
195 oled_write_P(PSTR("Lower\n"), false);
196 break;
197 case _RAISE:
198 oled_write_P(PSTR("Raise\n"), false);
199 break;
200 case _NAV:
201 oled_write_P(PSTR("Nav\n"), false);
202 break;
203 case _ADJUST:
204 oled_write_P(PSTR("Adjust\n"), false);
205 break;
206 default:
207 oled_write_P(PSTR("Undefined\n"), false);
208 }
209
210 // Host Keyboard LED Status
211 led_t led_state = host_keyboard_led_state();
212 oled_write_P(led_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false);
213 oled_write_P(led_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false);
214 oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false);
215}
216
217void oled_task_user(void) {
218 if (is_keyboard_master()) {
219 render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
220 } else {
221 render_kyria_logo();
222 }
223}
224#endif
225
226#ifdef ENCODER_ENABLE
227void encoder_update_user(uint8_t index, bool clockwise) {
228 if (index == 0) {
229 // Volume control
230 if (clockwise) {
231 tap_code(KC_VOLD);
232 } else {
233 tap_code(KC_VOLU);
234 }
235 }
236 else if (index == 1) {
237 // Page up/Page down
238 if (clockwise) {
239 tap_code(KC_PGDN);
240 } else {
241 tap_code(KC_PGUP);
242 }
243 }
244}
245#endif
diff --git a/keyboards/kyria/keymaps/ghidalgo93/rules.mk b/keyboards/kyria/keymaps/ghidalgo93/rules.mk
new file mode 100644
index 000000000..449e3d950
--- /dev/null
+++ b/keyboards/kyria/keymaps/ghidalgo93/rules.mk
@@ -0,0 +1,4 @@
1OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays
2ENCODER_ENABLE = yes # Enables the use of one or more encoders
3RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
4AUTO_SHIFT_ENABLE = yes # Enable auto shift
diff --git a/keyboards/kyria/keymaps/thomasbaart/config.h b/keyboards/kyria/keymaps/thomasbaart/config.h
index e878663bf..6128133ed 100644
--- a/keyboards/kyria/keymaps/thomasbaart/config.h
+++ b/keyboards/kyria/keymaps/thomasbaart/config.h
@@ -44,4 +44,4 @@
44#define EE_HANDS 44#define EE_HANDS
45 45
46// Allows media codes to properly register in macros and rotary encoder code 46// Allows media codes to properly register in macros and rotary encoder code
47#define TAP_CODE_DELAY 10 \ No newline at end of file 47#define TAP_CODE_DELAY 10