Skip to content

Commit

Permalink
Update x5 x6
Browse files Browse the repository at this point in the history
  • Loading branch information
galican committed Oct 20, 2023
1 parent 2a437ab commit d194ffc
Show file tree
Hide file tree
Showing 16 changed files with 356 additions and 377 deletions.
10 changes: 5 additions & 5 deletions keyboards/keychron/x5/ansi/red/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ enum layers{
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[WIN_BASE] = LAYOUT_82_ansi(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_INS,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_DEL,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PGUP,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_HOME,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
KC_LCTL, KC_LWIN, KC_LALT, KC_SPC, KC_RALT, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),

[WIN_FN] = LAYOUT_82_ansi(
_______, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, BL_DOWN, BL_UP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, BL_TOGG,
_______, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, BL_DOWN, BL_UP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
BL_TOGG, BL_STEP, BL_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, BL_DOWN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
Expand Down
10 changes: 5 additions & 5 deletions keyboards/keychron/x5/ansi/red/keymaps/keychron/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ enum layers {
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[WIN_BASE] = LAYOUT_82_ansi(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_INS,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_DEL,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PGUP,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_HOME,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
KC_LCTL, KC_LWIN, KC_LALT, KC_SPC, KC_RALT, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),

[WIN_FN] = LAYOUT_82_ansi(
_______, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, BL_DOWN, BL_UP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, BL_TOGG,
_______, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, BL_DOWN, BL_UP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
BL_TOGG, BL_STEP, BL_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, BL_DOWN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
Expand Down
10 changes: 5 additions & 5 deletions keyboards/keychron/x5/ansi/red/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ enum layers {
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[WIN_BASE] = LAYOUT_82_ansi(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_INS,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_DEL,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PGUP,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_HOME,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
KC_LCTL, KC_LWIN, KC_LALT, KC_SPC, KC_RALT, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),

[WIN_FN] = LAYOUT_82_ansi(
_______, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, BL_DOWN, BL_UP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, BL_TOGG,
_______, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, BL_DOWN, BL_UP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
BL_TOGG, BL_STEP, BL_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, BL_DOWN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
Expand Down
2 changes: 0 additions & 2 deletions keyboards/keychron/x5/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
"diode_direction": "ROW2COL",
"indicators": {
"caps_lock": "B14",
"num_lock": "B13",
"scroll_lock": "B12",
"on_state": 0
},
"features": {
Expand Down
32 changes: 16 additions & 16 deletions keyboards/keychron/x5/via_json/x5_ansi_red.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Lemokey X5 ANSI Knob Red",
"name": "Lemokey X5 ANSI Red",
"vendorId": "0x362D",
"productId": "0x0250",
"keycodes": ["qmk_lighting"],
Expand All @@ -16,7 +16,7 @@
{"name": "Screen Shot","title": "Screenshot in macOS","shortName": "SShot"},
{"name": "Cortana","title": "Cortana in windows","shortName": "Cortana"}
],
"matrix": {"rows": 6, "cols": 16},
"matrix": {"rows": 6, "cols": 15},
"layouts": {
"keymap": [
[
Expand Down Expand Up @@ -54,7 +54,7 @@
{
"x": 0.25
},
"0,14\n\n\n\n\n\n\n\n\ne0"
"0,14"
],
[
{
Expand Down Expand Up @@ -110,7 +110,7 @@
"c": "#aaaaaa",
"w": 1.5
},
"2,13",
"2,12",
{
"x": 0.25
},
Expand Down Expand Up @@ -139,7 +139,7 @@
"c": "#777777",
"w": 2.25
},
"3,13",
"3,12",
{
"x": 0.25,
"c": "#aaaaaa"
Expand All @@ -154,6 +154,7 @@
{
"c": "#cccccc"
},
"4,1",
"4,2",
"4,3",
"4,4",
Expand All @@ -163,20 +164,19 @@
"4,8",
"4,9",
"4,10",
"4,11",
{
"c": "#aaaaaa",
"w": 1.75
},
"4,13"
"4,11"
],
[
{
"y": -0.75,
"x": 14.25,
"c": "#777777"
"c": "#cccccc"
},
"4,14"
"4,12"
],
[
{
Expand All @@ -194,26 +194,26 @@
},
"5,2",
{
"c": "#cccccc",
"c": "#777777",
"w": 6.25
},
"5,6",
"5,5",
{
"c": "#aaaaaa"
},
"5,9",
"5,10",
"5,11",
"5,12"
"5,11"
],
[
{
"y": -0.75,
"x": 13.25,
"c": "#777777"
"c": "#cccccc"
},
"5,12",
"5,13",
"5,14",
"5,15"
"5,14"
]
]
}
Expand Down
7 changes: 7 additions & 0 deletions keyboards/keychron/x5/x5.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ void eeconfig_init_kb(void) {
eeconfig_init_user();
}

void keyboard_post_init_kb(void) {
setPinOutputPushPull(LED_WIN_LOCK_PIN);
eeconfig_read_user_datablock(&win_lock_state);

keyboard_post_init_user();
}

void housekeeping_task_kb() {
set_led_win_lock_state();
}
Expand Down
4 changes: 1 addition & 3 deletions keyboards/keychron/x6/ansi/red/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@
# define DRIVER_ADDR_1 0b1110100

/* RGB Matrix Configuration */
# define LED_MATRIX_LED_COUNT 104
# define LED_MATRIX_LED_COUNT 101

/* Scan phase of led driver set as MSKPHASE_9CHANNEL(defined as 0x03 in CKLED2001.h) */
# define PHASE_CHANNEL MSKPHASE_9CHANNEL
# define CKLED2001_CURRENT_TUNE \
{ 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60 }

Expand Down
Loading

0 comments on commit d194ffc

Please sign in to comment.