summaryrefslogtreecommitdiffstats
path: root/keyboards/splitkb/kyria/keymaps/john-ezra/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/splitkb/kyria/keymaps/john-ezra/keymap.c')
-rw-r--r--keyboards/splitkb/kyria/keymaps/john-ezra/keymap.c212
1 files changed, 101 insertions, 111 deletions
diff --git a/keyboards/splitkb/kyria/keymaps/john-ezra/keymap.c b/keyboards/splitkb/kyria/keymaps/john-ezra/keymap.c
index 3664fdfacf..f42cbf1d04 100644
--- a/keyboards/splitkb/kyria/keymaps/john-ezra/keymap.c
+++ b/keyboards/splitkb/kyria/keymaps/john-ezra/keymap.c
@@ -18,7 +18,6 @@
enum kyria_layers {
_HNTS,
- _QWERTY,
_LOWER,
_RAISE,
_ADJUST
@@ -26,17 +25,20 @@ enum kyria_layers {
enum kyria_keycodes {
HNTS = SAFE_RANGE,
- QWERTY,
LOWER,
RAISE,
CPY_PST,
- UNDO
+ UNDO,
+ FIND
};
+#define HNTS DF(_HNTS)
+#define QWERTY DF(_QWERTY)
#define BSP_CMD MT(MOD_LGUI, KC_BSPC)
#define SFT_ENT MT(MOD_LSFT, KC_ENT)
#define UNDO G(KC_Z)
#define FIND G(KC_F)
+#define MSS_CTL C(KC_UP)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@@ -44,83 +46,62 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* Default: HNTS
*
* ,-----------------------------------------------. ,-----------------------------------------------.
- * | ` | Z | R | L | D | W | | Y | P | U | X | Q | | \ |
+ * | Find | Z | R | L | D | W | | Y | P | U | X | Q | | \ |
* |-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
- * | Esc | H | N | T | S | C | | B | I | E | O | A | Esc |
+ * |Cpy/Pst| H | N | T | S | C | | B | I | E | O | A | ` ~ |
* |-------+-------+-------+-------+-------+-------+---------------. ,---------------+-------+-------+-------+-------+-------+-------|
- * |Cpy/Pst| K | V | M | F | G | Ctrl | Alt | | Caps | Del | J | ; : | , < | . > | / ? | ' " |
+ * | Undo | K | V | M | F | G | Esc |MssnCtl| |MssnCtl| Esc | J | ; : | , < | . > | / ? | ' " |
* `-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-----------------------'
- * | Up | Down | Lower | Space | BSPC | | Tab | Shift | Raise | Left | Right |
+ * | Ctrl | Alt | Lower | Space | BSPC | | Tab | Shift | Raise | Del | Caps |
* `---------------------------------------' `---------------------------------------'
*/
[_HNTS] = LAYOUT(
FIND, KC_Z, KC_R, KC_L, KC_D, KC_W, KC_Y, KC_P, KC_U, KC_X, KC_Q, KC_BSLS,
- CPY_PST, KC_H, KC_N, KC_T, KC_S, KC_C, KC_B, KC_I, KC_E, KC_O, KC_A, KC_ESC,
- 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,
- KC_UP, KC_DOWN, LOWER, KC_SPC, BSP_CMD, KC_TAB, SFT_ENT, RAISE, KC_LEFT, KC_RGHT
+ CPY_PST, KC_H, KC_N, KC_T, KC_S, KC_C, KC_B, KC_I, KC_E, KC_O, KC_A, KC_GRV,
+ UNDO, KC_K, KC_V, KC_M, KC_F, KC_G, KC_ESC, MSS_CTL, MSS_CTL, KC_ESC, KC_J, KC_SCLN, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT,
+ KC_LCTL, KC_LALT, LOWER, KC_SPC, BSP_CMD, KC_TAB, SFT_ENT, RAISE, KC_DEL, KC_CAPS
),
/*
- * Default: QWERTY
+ * Lower: Symbols & Media
*
* ,-----------------------------------------------. ,-----------------------------------------------.
- * | ` | Q | W | E | R | T | | Y | U | I | O | P | | \ |
+ * | Tab | * | / | + | - | = | | | | { | } | @ | ! | ` |
* |-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
- * | Esc | A | S | D | F | G | | H | J | K | L | ; | ' " |
+ * | Enter | Left | Up | Down | Right | | | \ | ( | ) | $ | # | ~ |
* |-------+-------+-------+-------+-------+-------+---------------. ,---------------+-------+-------+-------+-------+-------+-------|
- * |Cpy/Pst| Z | X | C | V | B | Ctrl | Alt | | Caps | Del | N | M | , < | . > | / ? |Cpy/Pst|
- * `-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-----------------------'
- * | Up | Down | Lower | Space | BSPC | | Tab | Shift | Raise | Left | Right |
- * `---------------------------------------' `---------------------------------------'
- */
-
-[_QWERTY] = LAYOUT(
- KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
- KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
- 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,
- KC_UP, KC_DOWN, LOWER, KC_SPC, BSP_CMD, KC_TAB, SFT_ENT, RAISE, KC_LEFT, KC_RGHT
-),
-
-/*
- * Lower: Symbols
- *
- * ,-----------------------------------------------. ,-----------------------------------------------.
- * | | ! | @ | { | } | | | | | | | | | | \ |
- * |-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
- * | | # | $ | ( | ) | ` ~ | | + | - | * | / | = | |
- * |-------+-------+-------+-------+-------+-------+---------------. ,---------------+-------+-------+-------+-------+-------+-------|
- * | | % | ^ | [ | ] | & | | | | | | | | | | | |
+ * | Esc | Vol- | Vol+ | Prev | Play | Next | | | | | | _ | [ | ] | ^ | % | & |
* `-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-----------------------'
* | | | | | | | | | | | |
* `---------------------------------------' `---------------------------------------'
*/
[_LOWER] = LAYOUT(
- KC_GRV, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, _______, _______, _______, _______,
- KC_TILD, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_BSLS, KC_PLUS, KC_MINS, KC_ASTR, KC_SLSH, KC_EQL, _______,
- KC_AMPR, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_UNDS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ KC_TAB, KC_ASTR, KC_SLSH, KC_PLUS, KC_MINS, KC_EQL, KC_PIPE, KC_LCBR, KC_RCBR, KC_AT, KC_EXLM, KC_GRV,
+ KC_ENT, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, _______, KC_BSLS, KC_LPRN, KC_RPRN, KC_DLR, KC_HASH, KC_TILD,
+ KC_ESC, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, KC_UNDS, KC_LBRC, KC_RBRC, KC_CIRC, KC_PERC, KC_AMPR,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
/*
- * Raise: Numbers & Media
+ * Raise: Numbers
*
* ,-----------------------------------------------. ,-----------------------------------------------.
- * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |
+ * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
* |-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
- * | | Prev | Play | Next | VolUp | Mute | |Bright+| Left | Down | Up | Right | |
+ * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 |
* |-------+-------+-------+-------+-------+-------+---------------. ,---------------+-------+-------+-------+-------+-------+-------|
- * | | | | | VolDn | | | | | | |Bright-| | | | | |
+ * | | | | | | | | | | | | | Left | Up | Down | Right | Esc |
* `-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-----------------------'
* | | | | | | | | | | | |
* `---------------------------------------' `---------------------------------------'
*/
[_RAISE] = LAYOUT(
- _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______,
- _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
- KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
+ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_ESC,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
@@ -128,86 +109,95 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* Adjust: Function Keys & RGB
*
* ,-----------------------------------------------. ,-----------------------------------------------.
- * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | |
+ * | Reset | | | | | | | | NKRO |CG SWAP| | | HNTS |
* |-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
- * | | TOG | SAI | HUI | VAI | MOD | | | | | F11 | F12 | NKRO |
+ * | | TOG | SAI | HUI | VAI | MOD | | | | | | | |
* |-------+-------+-------+-------+-------+-------+---------------. ,---------------+-------+-------+-------+-------+-------+-------|
- * | | | SAD | HUD | VAD | RMOD | | | | | | | | | | | |
+ * | | | SAD | HUD | VAD | RMOD | | | | | | | |Bright+|Bright-| | |
* `-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-----------------------'
* | | | | | | | | | | | |
* `---------------------------------------' `---------------------------------------'
*/
[_ADJUST] = LAYOUT(
- _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, NK_TOGG,
- _______, RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, RGB_MOD, KC_BRIU, _______, _______, KC_F11, KC_F12, CG_TOGG,
- _______, _______, RGB_SAD, RGB_HUD, RGB_VAD,RGB_RMOD,_______, _______, _______, _______, KC_BRID, _______, _______, _______, QWERTY, HNTS,
+ RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, HNTS,
+ _______, RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, RGB_MOD, CG_TOGG, NK_TOGG, KC_BRID, KC_BRIU, _______, _______,
+ _______, _______, RGB_SAD, RGB_HUD, RGB_VAD,RGB_RMOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
- case HNTS: //Layer Control
- if (record->event.pressed) {
- set_single_persistent_default_layer(_HNTS);
- }
- return false;
- break;
- case QWERTY:
- if (record->event.pressed) {
- set_single_persistent_default_layer(_QWERTY);
- }
- return false;
- break;
- case LOWER:
- if (record->event.pressed) {
- layer_on(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case RAISE:
- if (record->event.pressed) {
- layer_on(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case CPY_PST: // One key copy/paste
- {
- static uint16_t copy_paste_timer;
- if (record->event.pressed) {
- copy_paste_timer = timer_read();
- } else {
- if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy
- register_mods(mod_config(MOD_LGUI));
- tap_code(KC_C);
- unregister_mods(mod_config(MOD_LGUI));
- } else { // Tap, paste
- register_mods(mod_config(MOD_LGUI));
- tap_code(KC_V);
- unregister_mods(mod_config(MOD_LGUI));
- }
- }
- }
- break;
- case UNDO: // Undo Redo
- if ((get_mods() & MOD_BIT(KC_LGUI)) == MOD_BIT(KC_LGUI)) {
- if (record->event.pressed) {
- register_code(KC_Y);
- } else {
- unregister_code(KC_Y);
- }
- return false;
- }
- return true;
+ case LOWER:
+ if (record->event.pressed) {
+ layer_on(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case RAISE:
+ if (record->event.pressed) {
+ layer_on(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case CPY_PST: // Hold to Copy, Hold with GUI to Cut, Tap to Paste
+ {
+ static uint16_t copy_paste_timer;
+ if (record->event.pressed) {
+ copy_paste_timer = timer_read();
+ } else {
+ if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) {
+ if (get_mods() & MOD_MASK_GUI) {
+ tap_code16(LGUI(KC_X));
+ } else {
+ tap_code16(LGUI(KC_C));
+ }
+ } else {
+ tap_code16(LGUI(KC_V));
+ }
+ }
+ }
+ break;
+ case UNDO: // Tap to Undo, Tap with GUI to Redo
+ if (get_mods() & MOD_MASK_GUI) {
+ if (record->event.pressed) {
+ tap_code(KC_Y);
+ }
+ return false;
+ }
+ break;
+ case FIND: // Tap to Find, Tap with GUI to Select All
+ if (get_mods() & MOD_MASK_GUI) {
+ if (record->event.pressed) {
+ tap_code(KC_A);
+ }
+ return false;
+ }
+ break;
}
return true;
};
+
+const key_override_t ctrl_h = ko_make_basic(MOD_MASK_CTRL, KC_H, C(KC_LEFT)); //MocOS Desktop Navigation
+const key_override_t ctrl_n = ko_make_basic(MOD_MASK_CTRL, KC_N, C(KC_UP)); //MocOS Desktop Navigation
+const key_override_t ctrl_t = ko_make_basic(MOD_MASK_CTRL, KC_T, C(KC_DOWN)); //MocOS Desktop Navigation
+const key_override_t ctrl_s = ko_make_basic(MOD_MASK_CTRL, KC_S, C(KC_RGHT)); //MocOS Desktop Navigation
+const key_override_t bsp_del = ko_make_basic(MOD_MASK_SHIFT, BSP_CMD, KC_DEL); // Shift+Bksp sends Delete
+
+const key_override_t **key_overrides = (const key_override_t *[]){
+ &ctrl_h,
+ &ctrl_n,
+ &ctrl_t,
+ &ctrl_s,
+ &bsp_del,
+ NULL
+};