219afaba42
Co-authored-by: Ryan <fauxpark@gmail.com>
127 lines
12 KiB
C
127 lines
12 KiB
C
/*
|
|
Copyright 2021 Tyler Tolley <thattolleyguy@gmail.com>
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#include QMK_KEYBOARD_H
|
|
|
|
|
|
enum iris_layers {
|
|
_COLEMAK,
|
|
_QWERTY,
|
|
_LOWER,
|
|
_RAISE,
|
|
};
|
|
|
|
enum custom_keycodes {
|
|
COLEMAK = SAFE_RANGE,
|
|
QWERTY,
|
|
NUMPAD,
|
|
RGB_SPDU,
|
|
RGB_SPDD
|
|
};
|
|
|
|
#define L_LOWER MO(_LOWER)
|
|
#define L_RAISE MO(_RAISE)
|
|
|
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
|
|
[_COLEMAK] = LAYOUT(
|
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
|
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
|
KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_GRV, KC_DEL, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
|
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
|
KC_LGUI, L_LOWER, KC_ENT, KC_SPC, L_RAISE, KC_RALT
|
|
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
|
),
|
|
|
|
|
|
[_QWERTY] = LAYOUT(
|
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_DEL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
|
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
|
KC_LGUI, L_LOWER, KC_ENT, KC_SPC, L_RAISE, KC_RALT
|
|
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
|
),
|
|
|
|
|
|
[_LOWER] = LAYOUT(
|
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
|
XXXXXXX, KC_VOLU, KC_MPRV, KC_MPLY, KC_MSTP, KC_MNXT, BL_BRTG, XXXXXXX, KC_PSLS, KC_PAST, KC_PMNS, _______,
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
|
KC_MUTE, KC_VOLD, RGB_M_SW,RGB_TOG, XXXXXXX, XXXXXXX, BL_TOGG, KC_P7, KC_P8, KC_P9, KC_PPLS, XXXXXXX,
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
|
_______, RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, RGB_SPDU, BL_UP, KC_P4, KC_P5, KC_P6, KC_EQL, KC_PSCR,
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
|
_______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_RMOD,RGB_SPDD,_______, _______, BL_DOWN, KC_P1, KC_P2, KC_P3, KC_PDOT, _______,
|
|
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
|
_______, _______, _______, _______, L_RAISE, KC_P0
|
|
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
|
),
|
|
|
|
[_RAISE] = LAYOUT(
|
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
|
KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
|
XXXXXXX, COLEMAK, DM_REC1, KC_UP, DM_REC2, XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_UNDS,
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
|
_______, QWERTY, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGUP, KC_INS, KC_HOME, KC_PPLS, KC_MINS, KC_TILD, KC_EQL,
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
|
_______, DF(2), DM_PLY1, XXXXXXX, DM_PLY2, KC_PGDN, XXXXXXX, XXXXXXX, KC_DEL, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, _______,
|
|
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
|
_______, _______, _______, XXXXXXX, _______, _______
|
|
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
|
)
|
|
};
|
|
|
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
switch (keycode) {
|
|
case QWERTY:
|
|
if (record->event.pressed) {
|
|
set_single_persistent_default_layer(_QWERTY);
|
|
}
|
|
return false;
|
|
break;
|
|
case COLEMAK:
|
|
if (record->event.pressed) {
|
|
set_single_persistent_default_layer(_COLEMAK);
|
|
}
|
|
return false;
|
|
break;
|
|
case RGB_SPDD:
|
|
if (record->event.pressed) {
|
|
rgblight_decrease_speed();
|
|
}
|
|
return false;
|
|
case RGB_SPDU:
|
|
if (record->event.pressed) {
|
|
rgblight_increase_speed();
|
|
}
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|