diff --git a/keyboards/keycapsss/kimiko/rev1/keymaps/vial/keymap.c b/keyboards/keycapsss/kimiko/rev1/keymaps/vial/keymap.c index 19ee756d1d2..f94b6bad957 100644 --- a/keyboards/keycapsss/kimiko/rev1/keymaps/vial/keymap.c +++ b/keyboards/keycapsss/kimiko/rev1/keymaps/vial/keymap.c @@ -25,6 +25,9 @@ enum layers { _ADJUST, }; +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* QWERTY @@ -46,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT), - KC_LCTL, KC_LGUI, KC_LALT, TL_LOWR, KC_SPC, KC_ENT, TL_UPPR, KC_BSPC, KC_RGUI, KC_RALT + KC_LCTL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_ENT, RAISE, KC_BSPC, KC_RGUI, KC_RALT ), /* LOWER * ,-------------------------------------------. ,-----------------------------------------. @@ -114,6 +117,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); + return state; +} + + #if defined(ENCODER_MAP_ENABLE) const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [_QWERTY] = { ENCODER_CCW_CW(KC_DOWN, KC_UP), ENCODER_CCW_CW(KC_LEFT, KC_RGHT) }, diff --git a/keyboards/keycapsss/kimiko/rev1/keymaps/vial/rules.mk b/keyboards/keycapsss/kimiko/rev1/keymaps/vial/rules.mk index efd97b7d178..57126ffafaf 100644 --- a/keyboards/keycapsss/kimiko/rev1/keymaps/vial/rules.mk +++ b/keyboards/keycapsss/kimiko/rev1/keymaps/vial/rules.mk @@ -1,4 +1,3 @@ -TRI_LAYER_ENABLE = yes ENCODER_MAP_ENABLE = yes VIA_ENABLE = yes diff --git a/keyboards/keycapsss/kimiko/rev2/info.json b/keyboards/keycapsss/kimiko/rev2/info.json index 9993028cf51..6afcf53a7e9 100644 --- a/keyboards/keycapsss/kimiko/rev2/info.json +++ b/keyboards/keycapsss/kimiko/rev2/info.json @@ -42,7 +42,7 @@ }, "encoder": { "right": { - "rotary": [{ "pin_a": "F5", "pin_b": "F4" }] + "rotary": [{ "pin_a": "F4", "pin_b": "F5" }] } } }, @@ -155,13 +155,13 @@ { "flags": 4, "matrix": [3, 3], "x": 40, "y": 36 }, { "flags": 4, "matrix": [3, 4], "x": 53, "y": 39 }, { "flags": 4, "matrix": [3, 5], "x": 66, "y": 41 }, - { "flags": 4, "matrix": [5, 5], "x": 80, "y": 48 }, - { "flags": 4, "matrix": [4, 5], "x": 94, "y": 52 }, + { "flags": 4, "matrix": [5, 5], "x": 80, "y": 49 }, + { "flags": 4, "matrix": [4, 5], "x": 94, "y": 57 }, { "flags": 4, "matrix": [4, 4], "x": 87, "y": 64 }, - { "flags": 1, "matrix": [4, 3], "x": 73, "y": 60 }, - { "flags": 1, "matrix": [4, 2], "x": 53, "y": 51 }, - { "flags": 1, "matrix": [4, 1], "x": 40, "y": 47 }, - { "flags": 1, "matrix": [4, 0], "x": 26, "y": 51 }, + { "flags": 1, "matrix": [4, 3], "x": 73, "y": 57 }, + { "flags": 1, "matrix": [4, 2], "x": 53, "y": 52 }, + { "flags": 1, "matrix": [4, 1], "x": 40, "y": 49 }, + { "flags": 1, "matrix": [4, 0], "x": 26, "y": 49 }, { "flags": 4, "matrix": [6, 5], "x": 158, "y": 5 }, { "flags": 4, "matrix": [6, 4], "x": 171, "y": 4 }, { "flags": 4, "matrix": [6, 3], "x": 184, "y": 0 }, @@ -186,13 +186,13 @@ { "flags": 4, "matrix": [9, 3], "x": 184, "y": 36 }, { "flags": 4, "matrix": [9, 4], "x": 171, "y": 39 }, { "flags": 4, "matrix": [9, 5], "x": 158, "y": 41 }, - { "flags": 4, "matrix": [11, 5], "x": 144, "y": 48 }, - { "flags": 4, "matrix": [10, 5], "x": 130, "y": 52 }, - { "flags": 4, "matrix": [10, 4], "x": 137, "y": 64 }, - { "flags": 1, "matrix": [10, 3], "x": 151, "y": 60 }, - { "flags": 4, "matrix": [10, 2], "x": 171, "y": 51 }, - { "flags": 1, "matrix": [10, 1], "x": 184, "y": 47 }, - { "flags": 1, "matrix": [10, 0], "x": 198, "y": 51 } + { "flags": 4, "matrix": [11, 5], "x": 144, "y": 49 }, + { "flags": 4, "matrix": [10, 5], "x": 130, "y": 57 }, + { "flags": 4, "matrix": [10, 4], "x": 137, "y": 64}, + { "flags": 1, "matrix": [10, 3], "x": 151, "y": 57 }, + { "flags": 4, "matrix": [10, 2], "x": 171, "y": 52 }, + { "flags": 1, "matrix": [10, 1], "x": 184, "y": 49 }, + { "flags": 1, "matrix": [10, 0], "x": 198, "y": 49 } ] } } diff --git a/keyboards/keycapsss/kimiko/rev2/keymaps/vial/config.h b/keyboards/keycapsss/kimiko/rev2/keymaps/vial/config.h index 57ccf42f5eb..7605fa9da93 100644 --- a/keyboards/keycapsss/kimiko/rev2/keymaps/vial/config.h +++ b/keyboards/keycapsss/kimiko/rev2/keymaps/vial/config.h @@ -20,8 +20,8 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ #define VIAL_KEYBOARD_UID {0x95, 0x67, 0x21, 0xB7, 0x4B, 0x3A, 0x85, 0xE5} -#define VIAL_UNLOCK_COMBO_ROWS { 0, 9 } -#define VIAL_UNLOCK_COMBO_COLS { 0, 4 } +#define VIAL_UNLOCK_COMBO_ROWS { 0, 6 } +#define VIAL_UNLOCK_COMBO_COLS { 0, 0 } #define VIALRGB_NO_DIRECT /* Select hand configuration */ diff --git a/keyboards/keycapsss/kimiko/rev2/keymaps/vial/keymap.c b/keyboards/keycapsss/kimiko/rev2/keymaps/vial/keymap.c index d914254cd41..63b2c176ca9 100644 --- a/keyboards/keycapsss/kimiko/rev2/keymaps/vial/keymap.c +++ b/keyboards/keycapsss/kimiko/rev2/keymaps/vial/keymap.c @@ -26,6 +26,8 @@ enum layers { _ADJUST, }; +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* QWERTY @@ -46,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_LBRC, KC_RBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT), - KC_LCTL, KC_LGUI, KC_LALT, TL_LOWR, KC_SPC, KC_ENT, TL_UPPR, KC_BSPC, KC_RGUI, KC_RALT + KC_LCTL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_ENT, RAISE, KC_BSPC, KC_RGUI, KC_RALT ), /* LOWER * QWERTY @@ -111,12 +113,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); + return state; +} #if defined(ENCODER_MAP_ENABLE) -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { [_QWERTY] = { ENCODER_CCW_CW(KC_DOWN, KC_UP), ENCODER_CCW_CW(KC_LEFT, KC_RGHT) }, [_LOWER] = { ENCODER_CCW_CW(RGB_HUI, KC_TAB), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, [_RAISE] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_SPD, RGB_SPI) }, [_ADJUST] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD), ENCODER_CCW_CW(RGB_SAD, RGB_SAI) }, + // Encoder 1 Encoder 2 }; #endif // ENCODER_MAP_ENABLE diff --git a/keyboards/keycapsss/kimiko/rev2/keymaps/vial/rules.mk b/keyboards/keycapsss/kimiko/rev2/keymaps/vial/rules.mk index 5aef99d65df..7e1db9fe6ee 100644 --- a/keyboards/keycapsss/kimiko/rev2/keymaps/vial/rules.mk +++ b/keyboards/keycapsss/kimiko/rev2/keymaps/vial/rules.mk @@ -1,4 +1,3 @@ -TRI_LAYER_ENABLE = yes ENCODER_MAP_ENABLE = yes VIA_ENABLE = yes