2018-12-05 08:15:52 +06:00
|
|
|
#include QMK_KEYBOARD_H
|
2019-01-02 23:16:55 +06:00
|
|
|
#include "kageurufu.h"
|
2018-12-05 08:15:52 +06:00
|
|
|
#ifdef PROTOCOL_LUFA
|
|
|
|
#include "lufa.h"
|
|
|
|
#include "split_util.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern keymap_config_t keymap_config;
|
|
|
|
extern uint8_t is_master;
|
|
|
|
|
2019-01-02 23:16:55 +06:00
|
|
|
/* Base Layout
|
|
|
|
* ,------------------------------------------------. ,------------------------------------------------.
|
|
|
|
* | ` | | | | | | | | | | | | | | BkSp |
|
|
|
|
* |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
|
|
|
|
* | Tab | | | | | | | | | | | | | | \ |
|
|
|
|
* |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
|
|
|
|
* | Esc | | | | | | | | | | | | | | ' |
|
|
|
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
|
|
|
* | Sft( | | | | | | | | | | | | | | Sft) |
|
|
|
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
|
|
|
* | Ctrl | Win | Win | Alt | FN | Space| RGB | | FN | FN | - | = | Down | PgUp | PgDn |
|
|
|
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
|
|
|
* | Space| Bksp | | Enter| Space|
|
|
|
|
* `-------------' `--------=----'
|
|
|
|
*/
|
|
|
|
#define EXPAND_LAYOUT(...) LAYOUT(__VA_ARGS__)
|
|
|
|
#define _BASE_LAYOUT( \
|
2018-12-05 08:15:52 +06:00
|
|
|
_00, _01, _02, _03, _04, _05, _06, _07, _08, _09, \
|
|
|
|
_10, _11, _12, _13, _14, _15, _16, _17, _18, _19, \
|
|
|
|
_20, _21, _22, _23, _24, _25, _26, _27, _28, _29 \
|
|
|
|
) \
|
2019-01-02 23:16:55 +06:00
|
|
|
EXPAND_LAYOUT( \
|
2018-12-05 08:15:52 +06:00
|
|
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, RGB_MOD, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
|
|
|
|
KC_TAB, _00, _01, _02, _03, _04, KC_LBRC, KC_RBRC, _05, _06, _07, _08, _09, KC_BSLS, \
|
|
|
|
FN_ESC, _10, _11, _12, _13, _14, RGB_SAI, RGB_VAI, _15, _16, _17, _18, _19, KC_QUOT, \
|
|
|
|
KC_LSPO, _20, _21, _22, _23, _24, RGB_SAD, RGB_VAD, _25, _26, _27, _28, _29, KC_RSPC, \
|
|
|
|
KC_LCTL, KC_LGUI, KC_LGUI, KC_LALT, FN, KC_SPC, FN, FN, KC_SPC, KC_MINS, KC_EQL, KC_DOWN, KC_PGUP, KC_PGDN, \
|
2019-05-07 04:06:43 +06:00
|
|
|
KC_SPC, KC_BSPC, KC_ENT, KC_SPC \
|
2018-12-05 08:15:52 +06:00
|
|
|
)
|
2019-01-02 23:16:55 +06:00
|
|
|
#define BASE_LAYOUT(...) _BASE_LAYOUT(__VA_ARGS__)
|
2018-12-05 08:15:52 +06:00
|
|
|
|
|
|
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
2019-01-02 23:16:55 +06:00
|
|
|
|
2018-12-05 08:15:52 +06:00
|
|
|
[_QWERTY] = BASE_LAYOUT( \
|
2019-01-02 23:16:55 +06:00
|
|
|
_________________QWERTY_L1_________________, _________________QWERTY_R1_________________, \
|
|
|
|
_________________QWERTY_L2_________________, _________________QWERTY_R2_________________, \
|
|
|
|
_________________QWERTY_L3_________________, _________________QWERTY_R3_________________ \
|
2018-12-05 08:15:52 +06:00
|
|
|
),
|
|
|
|
|
|
|
|
[_COLEMAK] = BASE_LAYOUT( \
|
2019-01-02 23:16:55 +06:00
|
|
|
_________________COLEMAK_L1________________, _________________COLEMAK_R1________________, \
|
|
|
|
_________________COLEMAK_L2________________, _________________COLEMAK_R2________________, \
|
|
|
|
_________________COLEMAK_L3________________, _________________COLEMAK_R3________________ \
|
2018-12-05 08:15:52 +06:00
|
|
|
),
|
|
|
|
|
2019-01-02 23:16:55 +06:00
|
|
|
[_COLEMAK_DH] = BASE_LAYOUT( \
|
|
|
|
______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, \
|
|
|
|
______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, \
|
|
|
|
______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ \
|
|
|
|
),
|
2018-12-05 08:15:52 +06:00
|
|
|
|
2019-01-02 23:16:55 +06:00
|
|
|
[_FN] = EXPAND_LAYOUT( \
|
|
|
|
________________FUNCTION_L1________________, _______, KC_PSCR, ________________FUNCTION_R1________________, \
|
|
|
|
________________FUNCTION_L2________________, _______, _______, ________________FUNCTION_R2________________, \
|
|
|
|
________________FUNCTION_L3________________, _______, _______, ________________FUNCTION_R3________________, \
|
|
|
|
________________FUNCTION_L4________________, _______, _______, ________________FUNCTION_R4________________, \
|
|
|
|
________________FUNCTION_L5________________, ADJ, ADJ, ________________FUNCTION_R5________________, \
|
2019-05-07 04:06:43 +06:00
|
|
|
_______, KC_DEL, _______, _______ \
|
2018-12-05 08:15:52 +06:00
|
|
|
),
|
|
|
|
|
2019-05-07 04:06:43 +06:00
|
|
|
[_ADJ] = EXPAND_LAYOUT( \
|
2019-01-02 23:16:55 +06:00
|
|
|
_________________ADJUST_L1_________________, _______, _______, _________________ADJUST_R1_________________, \
|
|
|
|
_________________ADJUST_L2_________________, _______, _______, _________________ADJUST_R2_________________, \
|
|
|
|
_________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, \
|
|
|
|
_________________ADJUST_L4_________________, _______, _______, _________________ADJUST_R4_________________, \
|
|
|
|
_________________ADJUST_L5_________________, _______, _______, _________________ADJUST_R5_________________, \
|
2019-05-07 04:06:43 +06:00
|
|
|
_______, _______, _______, _______ \
|
2018-12-05 08:15:52 +06:00
|
|
|
)
|
|
|
|
};
|
2019-05-07 04:06:43 +06:00
|
|
|
|
|
|
|
#ifdef ENCODER_ENABLE
|
2021-05-22 12:17:32 +06:00
|
|
|
bool encoder_update_user(uint8_t index, bool clockwise) {
|
2019-05-07 04:06:43 +06:00
|
|
|
if (index == 0) { /* First encoder */
|
|
|
|
if (clockwise) {
|
|
|
|
tap_code(KC_VOLU);
|
|
|
|
} else {
|
|
|
|
tap_code(KC_VOLD);
|
|
|
|
}
|
|
|
|
} else if (index == 1) { /* Second encoder*/
|
|
|
|
if (clockwise) {
|
|
|
|
tap_code(KC_VOLU);
|
|
|
|
} else {
|
|
|
|
tap_code(KC_VOLD);
|
|
|
|
}
|
|
|
|
}
|
2021-05-22 12:17:32 +06:00
|
|
|
return true;
|
2019-05-07 04:06:43 +06:00
|
|
|
}
|
|
|
|
#endif
|