2018-10-15 17:21:14 +00:00
|
|
|
#include QMK_KEYBOARD_H
|
|
|
|
|
|
|
|
extern keymap_config_t keymap_config;
|
|
|
|
|
|
|
|
#define _QWERTY 0
|
|
|
|
#define _LOWER 1
|
|
|
|
#define _RAISE 2
|
|
|
|
#define _ADJUST 4
|
|
|
|
|
|
|
|
enum custom_keycodes {
|
|
|
|
QWERTY = SAFE_RANGE,
|
|
|
|
LOWER,
|
|
|
|
RAISE,
|
|
|
|
ADJUST,
|
|
|
|
};
|
|
|
|
|
|
|
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
|
|
|
|
|
|
[_QWERTY] = LAYOUT(
|
|
|
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
2018-12-05 16:19:14 +00:00
|
|
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
2018-10-15 17:21:14 +00:00
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
2018-12-05 16:19:14 +00:00
|
|
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT,
|
2018-10-15 17:21:14 +00:00
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
2018-12-05 16:19:14 +00:00
|
|
|
KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RSFT,
|
2018-10-15 17:21:14 +00:00
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
2018-12-05 16:19:14 +00:00
|
|
|
KC_LGUI, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_RALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RGUI,
|
2018-10-15 17:21:14 +00:00
|
|
|
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
2018-12-05 16:19:14 +00:00
|
|
|
KC_LCTL, LOWER, KC_SPC, KC_ENT, RAISE, KC_RCTL
|
2018-10-15 17:21:14 +00:00
|
|
|
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
|
|
|
),
|
|
|
|
|
|
|
|
[_LOWER] = LAYOUT(
|
|
|
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
2018-12-08 00:50:43 +00:00
|
|
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_7, KC_8, KC_9, KC_PLUS, _______,
|
2018-10-15 17:21:14 +00:00
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
2018-12-08 00:50:43 +00:00
|
|
|
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSLS, KC_4, KC_5, KC_6, KC_MINUS, _______,
|
2018-10-15 17:21:14 +00:00
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
2018-12-08 00:50:43 +00:00
|
|
|
KC_VOLU, KC_HOME, KC_LEFT, KC_UP, KC_RGHT, KC_PGUP, KC_PAST, KC_1, KC_2, KC_3, KC_EQL, _______,
|
2018-10-15 17:21:14 +00:00
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
2018-12-08 00:50:43 +00:00
|
|
|
KC_VOLD, KC_END, KC_INS, KC_DOWN, KC_DEL, KC_PGDN, KC_MUTE, _______, _______, KC_0, KC_COMM, KC_DOT, KC_ENT, _______,
|
2018-10-15 17:21:14 +00:00
|
|
|
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
2018-12-08 00:50:43 +00:00
|
|
|
_______, _______, _______, _______, _______, _______
|
2018-10-15 17:21:14 +00:00
|
|
|
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
|
|
|
),
|
|
|
|
|
|
|
|
[_RAISE] = LAYOUT(
|
|
|
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
2018-12-08 00:50:43 +00:00
|
|
|
_______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
2018-10-15 17:21:14 +00:00
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
2018-12-08 00:50:43 +00:00
|
|
|
KC_GRAVE, KC_TILD, KC_UNDS, KC_EQL, KC_PIPE, _______, _______, _______, _______, _______, _______, _______,
|
2018-10-15 17:21:14 +00:00
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
2018-12-05 20:13:52 +00:00
|
|
|
KC_BSLASH,KC_LCBR, KC_RCBR, KC_MINUS, KC_LBRC, KC_RBRC, _______, KC_LEFT, KC_UP, KC_RGHT, _______, _______,
|
2018-10-15 17:21:14 +00:00
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
2018-12-08 00:50:43 +00:00
|
|
|
KC_COLN, KC_LT, KC_GT, KC_PLUS, KC_LPRN, KC_RPRN, _______, _______, _______, _______, KC_DOWN, _______, _______, _______,
|
2018-10-15 17:21:14 +00:00
|
|
|
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
2018-12-08 00:50:43 +00:00
|
|
|
_______, _______, _______, _______, _______, _______
|
2018-10-15 17:21:14 +00:00
|
|
|
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
|
|
|
),
|
|
|
|
|
|
|
|
[_ADJUST] = LAYOUT(
|
|
|
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
2018-12-05 16:19:14 +00:00
|
|
|
_______, _______, KC_CAPS, KC_MENU, KC_APP, KC_PSCR, _______, _______, _______, _______, _______, _______,
|
2018-10-15 17:21:14 +00:00
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
2018-12-05 16:19:14 +00:00
|
|
|
_______, _______, _______, _______, _______, KC_PAUS, _______, _______, _______, _______, _______, _______,
|
2018-10-15 17:21:14 +00:00
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
2018-12-05 16:19:14 +00:00
|
|
|
_______, _______, _______, _______, _______, KC_SLCK, _______, _______, _______, _______, _______, _______,
|
2018-10-15 17:21:14 +00:00
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
|
|
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
|
|
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
|
|
|
_______, _______, _______, _______, _______, _______
|
|
|
|
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
|
|
|
),
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
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 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 ADJUST:
|
|
|
|
if (record->event.pressed) {
|
|
|
|
layer_on(_ADJUST);
|
|
|
|
} else {
|
|
|
|
layer_off(_ADJUST);
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|