2018-05-22 16:59:43 -07:00
|
|
|
#include QMK_KEYBOARD_H
|
|
|
|
#include "edvorakjp.h"
|
|
|
|
|
2021-04-09 17:37:49 -07:00
|
|
|
#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
|
|
|
|
#define __KC_TRNS_x6__ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
2018-05-22 16:59:43 -07:00
|
|
|
|
2021-04-09 17:37:49 -07:00
|
|
|
// clang-format off
|
2018-05-22 16:59:43 -07:00
|
|
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
2021-04-09 17:37:49 -07:00
|
|
|
[L_EDVORAKJP_BASE] = LAYOUT_wrapper(
|
|
|
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
|
|
|
KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24,
|
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
|
|
|
KC_GRV, __EDVORAKJP_BASE_L1__ , __EDVORAKJP_BASE_R1__ , KC_BSLS,
|
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
|
|
|
KC_EQL, __EDVORAKJP_BASE_L2__ , __EDVORAKJP_BASE_R2__ , KC_MINS,
|
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
|
|
|
KC_ESC, __EDVORAKJP_BASE_L3__ , XXXXXXX, XXXXXXX, __EDVORAKJP_BASE_R3__ , KC_SLSH,
|
|
|
|
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
|
|
|
LA_TAB, LS_SPC,LOWER_TD, RAISE_TD, RC_BSPC, RG_ENT
|
|
|
|
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
2018-05-22 16:59:43 -07:00
|
|
|
),
|
|
|
|
|
2021-04-09 17:37:49 -07:00
|
|
|
[L_EDVORAKJP_LOWER] = LAYOUT_wrapper(
|
|
|
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
|
|
|
__KC_TRNS_x6__ , __KC_TRNS_x6__ ,
|
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
|
|
|
XXXXXXX, XXXXXXX, __EDVORAKJP_BRACKET_L__ , XXXXXXX, XXXXXXX, __EDVORAKJP_BRACKET_R__ , XXXXXXX, XXXXXXX,
|
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
|
|
|
__EDVORAKJP_FUNCTION_L__ , __EDVORAKJP_FUNCTION_R__ ,
|
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
|
|
|
KC_PSCR, XXXXXXX, __EDVORAKJP_PAGE__ , XXXXXXX, XXXXXXX, __EDVORAKJP_CURSOR__ , XXXXXXX, XXXXXXX,
|
|
|
|
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
|
|
|
KC_TRNS, KC_TRNS, XXXXXXX, KC_MAC, RC_DEL, KC_TRNS
|
|
|
|
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
2018-05-22 16:59:43 -07:00
|
|
|
),
|
|
|
|
|
2021-04-09 17:37:49 -07:00
|
|
|
[L_EDVORAKJP_RAISE] = LAYOUT_wrapper(
|
|
|
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
|
|
|
__KC_TRNS_x6__ , __KC_TRNS_x6__ ,
|
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
|
|
|
XXXXXXX, XXXXXXX, __EDVORAKJP_SYMBOL_L__ , __EDVORAKJP_SYMBOL_R__ , XXXXXXX, XXXXXXX,
|
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
|
|
|
XXXXXXX, __EDVORAKJP_NUMBER_L__ , __EDVORAKJP_NUMBER_R__ , XXXXXXX,
|
|
|
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
|
|
|
KC_PSCR, XXXXXXX, __EDVORAKJP_PAGE__ , XXXXXXX, XXXXXXX, __EDVORAKJP_CURSOR__ , XXXXXXX, XXXXXXX,
|
|
|
|
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
|
|
|
KC_TRNS, KC_TRNS, KC_WIN, XXXXXXX, KC_TRNS, KC_TRNS
|
|
|
|
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
2018-05-22 16:59:43 -07:00
|
|
|
)
|
|
|
|
};
|
2021-04-09 17:37:49 -07:00
|
|
|
// clang-format on
|
2018-05-22 16:59:43 -07:00
|
|
|
|
2023-01-20 08:21:17 -08:00
|
|
|
void matrix_init_keymap(void) {}
|
2018-05-22 16:59:43 -07:00
|
|
|
|
2019-03-09 08:22:21 -08:00
|
|
|
#ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT
|
2022-06-18 14:37:51 -07:00
|
|
|
layer_state_t layer_state_set_keymap(layer_state_t state) {
|
2021-04-09 17:37:49 -07:00
|
|
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
2022-06-18 14:37:51 -07:00
|
|
|
switch (get_highest_layer(state)) {
|
2021-04-09 17:37:49 -07:00
|
|
|
case L_EDVORAKJP_LOWER:
|
2022-10-27 15:50:14 -07:00
|
|
|
rgblight_sethsv_noeeprom(HSV_RED);
|
2021-04-09 17:37:49 -07:00
|
|
|
break;
|
|
|
|
case L_EDVORAKJP_RAISE:
|
2022-10-27 15:50:14 -07:00
|
|
|
rgblight_sethsv_noeeprom(HSV_GREEN);
|
2021-04-09 17:37:49 -07:00
|
|
|
break;
|
|
|
|
default: // for any other layers, or the default layer
|
|
|
|
rgblight_mode(RGBLIGHT_MODE_STATIC_GRADIENT + 3);
|
2022-10-27 15:50:14 -07:00
|
|
|
rgblight_sethsv(HSV_RED);
|
2021-04-09 17:37:49 -07:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
return state;
|
2018-05-22 16:59:43 -07:00
|
|
|
}
|
2019-03-09 08:22:21 -08:00
|
|
|
#endif
|