2018-05-23 05:59:43 +06:00
|
|
|
#include "edvorakjp.h"
|
|
|
|
|
|
|
|
void matrix_init_user(void) {
|
2021-04-10 06:37:49 +06:00
|
|
|
edvorakjp_status_init();
|
|
|
|
matrix_init_keymap();
|
2018-05-23 05:59:43 +06:00
|
|
|
}
|
|
|
|
|
2023-04-26 14:32:15 +06:00
|
|
|
__attribute__((weak)) void matrix_init_keymap(void) {}
|
2018-05-23 05:59:43 +06:00
|
|
|
|
2021-07-19 22:50:55 +06:00
|
|
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
2021-04-10 06:37:49 +06:00
|
|
|
state = update_tri_layer_state(state, L_EDVORAKJP_LOWER, L_EDVORAKJP_RAISE, L_EDVORAKJP_ADJUST);
|
|
|
|
return layer_state_set_keymap(state);
|
2018-05-23 05:59:43 +06:00
|
|
|
}
|
|
|
|
|
2022-06-19 03:37:51 +06:00
|
|
|
__attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) { return state; }
|
2018-05-23 05:59:43 +06:00
|
|
|
|
|
|
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
2021-04-10 06:37:49 +06:00
|
|
|
bool process_record_user_result = process_record_keymap(keycode, record) && process_record_edvorakjp_swap_scln(keycode, record) && process_record_edvorakjp_config(keycode, record) && process_record_layer(keycode, record) && process_record_ime(keycode, record);
|
|
|
|
return process_record_user_result;
|
2018-05-23 05:59:43 +06:00
|
|
|
}
|
2018-11-26 23:50:45 +06:00
|
|
|
|
2021-04-10 06:37:49 +06:00
|
|
|
__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; }
|