Skip to content

Commit 5eb500a

Browse files
john-ezradrashnafauxpark
authored
[Keymap] Add john-ezra Kyria Keymap (#14338)
Co-authored-by: Drashna Jaelre <[email protected]> Co-authored-by: Ryan <[email protected]>
1 parent 35bff47 commit 5eb500a

File tree

4 files changed

+410
-0
lines changed

4 files changed

+410
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/* Copyright 2021 John Ezra
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_EFFECT_BREATHING
25+
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
26+
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
27+
#define RGBLIGHT_EFFECT_SNAKE
28+
#define RGBLIGHT_EFFECT_KNIGHT
29+
#define RGBLIGHT_EFFECT_CHRISTMAS
30+
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
31+
#define RGBLIGHT_EFFECT_RGB_TEST
32+
#define RGBLIGHT_EFFECT_ALTERNATING
33+
#define RGBLIGHT_EFFECT_TWINKLE
34+
#define RGBLIGHT_HUE_STEP 8
35+
#define RGBLIGHT_SAT_STEP 8
36+
#define RGBLIGHT_VAL_STEP 8
37+
#define RGBLIGHT_LIMIT_VAL 150
38+
#endif
39+
40+
#undef DEBOUNCE
41+
#define DEBOUNCE 1
42+
43+
#define SPLIT_WPM_ENABLE
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
/* Copyright 2021 John Ezra
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+
19+
enum kyria_layers {
20+
_HNTS,
21+
_QWERTY,
22+
_LOWER,
23+
_RAISE,
24+
_ADJUST
25+
};
26+
27+
enum kyria_keycodes {
28+
HNTS = SAFE_RANGE,
29+
QWERTY,
30+
LOWER,
31+
RAISE,
32+
CPY_PST,
33+
UNDO
34+
};
35+
36+
#define BSP_CMD MT(MOD_LGUI, KC_BSPC)
37+
#define SFT_ENT MT(MOD_LSFT, KC_ENT)
38+
#define UNDO G(KC_Z)
39+
#define FIND G(KC_F)
40+
41+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
42+
43+
/*
44+
* Default: HNTS
45+
*
46+
* ,-----------------------------------------------. ,-----------------------------------------------.
47+
* | ` | Z | R | L | D | W | | Y | P | U | X | Q | | \ |
48+
* |-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
49+
* | Esc | H | N | T | S | C | | B | I | E | O | A | Esc |
50+
* |-------+-------+-------+-------+-------+-------+---------------. ,---------------+-------+-------+-------+-------+-------+-------|
51+
* |Cpy/Pst| K | V | M | F | G | Ctrl | Alt | | Caps | Del | J | ; : | , < | . > | / ? | ' " |
52+
* `-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-----------------------'
53+
* | Up | Down | Lower | Space | BSPC | | Tab | Shift | Raise | Left | Right |
54+
* `---------------------------------------' `---------------------------------------'
55+
*/
56+
57+
[_HNTS] = LAYOUT(
58+
FIND, KC_Z, KC_R, KC_L, KC_D, KC_W, KC_Y, KC_P, KC_U, KC_X, KC_Q, KC_BSLS,
59+
CPY_PST, KC_H, KC_N, KC_T, KC_S, KC_C, KC_B, KC_I, KC_E, KC_O, KC_A, KC_ESC,
60+
UNDO, KC_K, KC_V, KC_M, KC_F, KC_G, KC_LCTL, KC_LALT, KC_CAPS, KC_DEL, KC_J, KC_SCLN, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT,
61+
KC_UP, KC_DOWN, LOWER, KC_SPC, BSP_CMD, KC_TAB, SFT_ENT, RAISE, KC_LEFT, KC_RGHT
62+
),
63+
64+
/*
65+
* Default: QWERTY
66+
*
67+
* ,-----------------------------------------------. ,-----------------------------------------------.
68+
* | ` | Q | W | E | R | T | | Y | U | I | O | P | | \ |
69+
* |-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
70+
* | Esc | A | S | D | F | G | | H | J | K | L | ; | ' " |
71+
* |-------+-------+-------+-------+-------+-------+---------------. ,---------------+-------+-------+-------+-------+-------+-------|
72+
* |Cpy/Pst| Z | X | C | V | B | Ctrl | Alt | | Caps | Del | N | M | , < | . > | / ? |Cpy/Pst|
73+
* `-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-----------------------'
74+
* | Up | Down | Lower | Space | BSPC | | Tab | Shift | Raise | Left | Right |
75+
* `---------------------------------------' `---------------------------------------'
76+
*/
77+
78+
[_QWERTY] = LAYOUT(
79+
KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
80+
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
81+
CPY_PST, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCTL, KC_LALT, KC_CAPS, KC_DEL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, CPY_PST,
82+
KC_UP, KC_DOWN, LOWER, KC_SPC, BSP_CMD, KC_TAB, SFT_ENT, RAISE, KC_LEFT, KC_RGHT
83+
),
84+
85+
/*
86+
* Lower: Symbols
87+
*
88+
* ,-----------------------------------------------. ,-----------------------------------------------.
89+
* | | ! | @ | { | } | | | | | | | | | | \ |
90+
* |-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
91+
* | | # | $ | ( | ) | ` ~ | | + | - | * | / | = | |
92+
* |-------+-------+-------+-------+-------+-------+---------------. ,---------------+-------+-------+-------+-------+-------+-------|
93+
* | | % | ^ | [ | ] | & | | | | | | | | | | | |
94+
* `-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-----------------------'
95+
* | | | | | | | | | | | |
96+
* `---------------------------------------' `---------------------------------------'
97+
*/
98+
99+
[_LOWER] = LAYOUT(
100+
KC_GRV, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, _______, _______, _______, _______,
101+
KC_TILD, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_BSLS, KC_PLUS, KC_MINS, KC_ASTR, KC_SLSH, KC_EQL, _______,
102+
KC_AMPR, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_UNDS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
103+
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
104+
),
105+
106+
/*
107+
* Raise: Numbers & Media
108+
*
109+
* ,-----------------------------------------------. ,-----------------------------------------------.
110+
* | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |
111+
* |-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
112+
* | | Prev | Play | Next | VolUp | Mute | |Bright+| Left | Down | Up | Right | |
113+
* |-------+-------+-------+-------+-------+-------+---------------. ,---------------+-------+-------+-------+-------+-------+-------|
114+
* | | | | | VolDn | | | | | | |Bright-| | | | | |
115+
* `-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-----------------------'
116+
* | | | | | | | | | | | |
117+
* `---------------------------------------' `---------------------------------------'
118+
*/
119+
120+
[_RAISE] = LAYOUT(
121+
_______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______,
122+
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
123+
KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
124+
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
125+
),
126+
127+
/*
128+
* Adjust: Function Keys & RGB
129+
*
130+
* ,-----------------------------------------------. ,-----------------------------------------------.
131+
* | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | |
132+
* |-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
133+
* | | TOG | SAI | HUI | VAI | MOD | | | | | F11 | F12 | NKRO |
134+
* |-------+-------+-------+-------+-------+-------+---------------. ,---------------+-------+-------+-------+-------+-------+-------|
135+
* | | | SAD | HUD | VAD | RMOD | | | | | | | | | | | |
136+
* `-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-----------------------'
137+
* | | | | | | | | | | | |
138+
* `---------------------------------------' `---------------------------------------'
139+
*/
140+
141+
[_ADJUST] = LAYOUT(
142+
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, NK_TOGG,
143+
_______, RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, RGB_MOD, KC_BRIU, _______, _______, KC_F11, KC_F12, CG_TOGG,
144+
_______, _______, RGB_SAD, RGB_HUD, RGB_VAD,RGB_RMOD,_______, _______, _______, _______, KC_BRID, _______, _______, _______, QWERTY, HNTS,
145+
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
146+
),
147+
};
148+
149+
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
150+
switch (keycode) {
151+
case HNTS: //Layer Control
152+
if (record->event.pressed) {
153+
set_single_persistent_default_layer(_HNTS);
154+
}
155+
return false;
156+
break;
157+
case QWERTY:
158+
if (record->event.pressed) {
159+
set_single_persistent_default_layer(_QWERTY);
160+
}
161+
return false;
162+
break;
163+
case LOWER:
164+
if (record->event.pressed) {
165+
layer_on(_LOWER);
166+
update_tri_layer(_LOWER, _RAISE, _ADJUST);
167+
} else {
168+
layer_off(_LOWER);
169+
update_tri_layer(_LOWER, _RAISE, _ADJUST);
170+
}
171+
return false;
172+
break;
173+
case RAISE:
174+
if (record->event.pressed) {
175+
layer_on(_RAISE);
176+
update_tri_layer(_LOWER, _RAISE, _ADJUST);
177+
} else {
178+
layer_off(_RAISE);
179+
update_tri_layer(_LOWER, _RAISE, _ADJUST);
180+
}
181+
return false;
182+
break;
183+
case CPY_PST: // One key copy/paste
184+
{
185+
static uint16_t copy_paste_timer;
186+
if (record->event.pressed) {
187+
copy_paste_timer = timer_read();
188+
} else {
189+
if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy
190+
register_mods(mod_config(MOD_LGUI));
191+
tap_code(KC_C);
192+
unregister_mods(mod_config(MOD_LGUI));
193+
} else { // Tap, paste
194+
register_mods(mod_config(MOD_LGUI));
195+
tap_code(KC_V);
196+
unregister_mods(mod_config(MOD_LGUI));
197+
}
198+
}
199+
}
200+
break;
201+
case UNDO: // Undo Redo
202+
if ((get_mods() & MOD_BIT(KC_LGUI)) == MOD_BIT(KC_LGUI)) {
203+
if (record->event.pressed) {
204+
register_code(KC_Y);
205+
} else {
206+
unregister_code(KC_Y);
207+
}
208+
return false;
209+
}
210+
return true;
211+
}
212+
return true;
213+
};

0 commit comments

Comments
 (0)