Skip to content

Commit

Permalink
Fix Rev2 layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Roe authored and Ben Roe committed Sep 22, 2023
1 parent 6236c4d commit 16a1925
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 21 deletions.
11 changes: 10 additions & 1 deletion keyboards/keycapsss/kimiko/rev1/keymaps/vial/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
* ,-------------------------------------------. ,-----------------------------------------.
Expand Down Expand Up @@ -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) },
Expand Down
1 change: 0 additions & 1 deletion keyboards/keycapsss/kimiko/rev1/keymaps/vial/rules.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
TRI_LAYER_ENABLE = yes
ENCODER_MAP_ENABLE = yes

VIA_ENABLE = yes
Expand Down
28 changes: 14 additions & 14 deletions keyboards/keycapsss/kimiko/rev2/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
"encoder": {
"right": {
"rotary": [{ "pin_a": "F5", "pin_b": "F4" }]
"rotary": [{ "pin_a": "F4", "pin_b": "F5" }]
}
}
},
Expand Down Expand Up @@ -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 },
Expand All @@ -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 }
]
}
}
4 changes: 2 additions & 2 deletions keyboards/keycapsss/kimiko/rev2/keymaps/vial/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
11 changes: 9 additions & 2 deletions keyboards/keycapsss/kimiko/rev2/keymaps/vial/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
1 change: 0 additions & 1 deletion keyboards/keycapsss/kimiko/rev2/keymaps/vial/rules.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
TRI_LAYER_ENABLE = yes
ENCODER_MAP_ENABLE = yes

VIA_ENABLE = yes
Expand Down

0 comments on commit 16a1925

Please sign in to comment.