2018-10-15 19:21:14 +02: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 17:19:14 +01: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 19:21:14 +02:00
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
2018-12-05 17:19:14 +01: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 19:21:14 +02:00
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
2018-12-05 17:19:14 +01: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 19:21:14 +02:00
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
2018-12-05 17:19:14 +01: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 19:21:14 +02:00
|
|
|
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
2018-12-05 17:19:14 +01:00
|
|
|
KC_LCTL, LOWER, KC_SPC, KC_ENT, RAISE, KC_RCTL
|
2018-10-15 19:21:14 +02:00
|
|
|
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
|
|
|
),
|
|
|
|
|
|
|
|
[_LOWER] = LAYOUT(
|
|
|
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
2018-12-05 17:19:14 +01:00
|
|
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX,
|
2018-10-15 19:21:14 +02:00
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
2018-12-05 17:19:14 +01:00
|
|
|
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
2018-10-15 19:21:14 +02:00
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
2018-12-05 17:19:14 +01:00
|
|
|
KC_VOLU, KC_HOME, KC_LEFT, KC_UP, KC_RGHT, KC_PGUP, KC_WH_U, KC_MS_L, KC_MS_U, KC_MS_R, XXXXXXX, KC_BTN4,
|
2018-10-15 19:21:14 +02:00
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
2018-12-05 17:19:14 +01:00
|
|
|
KC_VOLD, KC_END, KC_INS, KC_DOWN, KC_DEL, KC_PGDN, KC_MUTE, XXXXXXX, KC_WH_D, KC_WH_L, KC_MS_D, KC_WH_R, XXXXXXX, KC_BTN5,
|
2018-10-15 19:21:14 +02:00
|
|
|
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
2018-12-05 17:19:14 +01:00
|
|
|
_______, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3
|
2018-10-15 19:21:14 +02:00
|
|
|
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
|
|
|
),
|
|
|
|
|
|
|
|
[_RAISE] = LAYOUT(
|
|
|
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
2018-12-05 17:19:14 +01:00
|
|
|
KC_GRAVE,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
2018-10-15 19:21:14 +02:00
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
2018-12-05 17:19:14 +01:00
|
|
|
KC_TILD, KC_PIPE, KC_LT, KC_GT, _______, _______, _______, _______, _______, _______, _______, _______,
|
2018-10-15 19:21:14 +02:00
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
2018-12-05 17:19:14 +01:00
|
|
|
KC_BSLASH,KC_LCBR, KC_RCBR, KC_MINUS, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, _______,
|
2018-10-15 19:21:14 +02:00
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
2018-12-05 17:19:14 +01:00
|
|
|
KC_COLN, KC_UNDS, KC_LPRN, KC_PLUS, KC_RPRN, KC_EQL, KC_UNDO, _______, _______, _______, _______, _______, _______, _______,
|
2018-10-15 19:21:14 +02:00
|
|
|
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
2018-12-05 17:19:14 +01:00
|
|
|
KC_CUT, KC_COPY, KC_PSTE, _______, _______, _______
|
2018-10-15 19:21:14 +02:00
|
|
|
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
|
|
|
),
|
|
|
|
|
|
|
|
[_ADJUST] = LAYOUT(
|
|
|
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
2018-12-05 17:19:14 +01:00
|
|
|
_______, _______, KC_CAPS, KC_MENU, KC_APP, KC_PSCR, _______, _______, _______, _______, _______, _______,
|
2018-10-15 19:21:14 +02:00
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
2018-12-05 17:19:14 +01:00
|
|
|
_______, _______, _______, _______, _______, KC_PAUS, _______, _______, _______, _______, _______, _______,
|
2018-10-15 19:21:14 +02:00
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
2018-12-05 17:19:14 +01:00
|
|
|
_______, _______, _______, _______, _______, KC_SLCK, _______, _______, _______, _______, _______, _______,
|
2018-10-15 19:21:14 +02: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;
|
|
|
|
}
|