Skip to content

Commit 6a94e25

Browse files
authored
[Keyboard] Add VIA support to SX60 and update default keymap (qmk#11908)
1 parent d4be96e commit 6a94e25

File tree

6 files changed

+115
-41
lines changed

6 files changed

+115
-41
lines changed

keyboards/sx60/config.h

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,29 @@
1-
#ifndef CONFIG_H
2-
#define CONFIG_H
1+
/* Copyright 2021 Danny Nguyen <danny@keeb.io>
2+
3+
This program is free software: you can redistribute it and/or modify
4+
it under the terms of the GNU General Public License as published by
5+
the Free Software Foundation, either version 2 of the License, or
6+
(at your option) any later version.
7+
8+
This program is distributed in the hope that it will be useful,
9+
but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
GNU General Public License for more details.
12+
13+
You should have received a copy of the GNU General Public License
14+
along with this program. If not, see <http://www.gnu.org/licenses/>.
15+
*/
16+
17+
#pragma once
318

419
#include "config_common.h"
520

621
/* USB Device descriptor parameter */
7-
#define VENDOR_ID 0xFEED
8-
#define PRODUCT_ID 0x6060
22+
#define VENDOR_ID 0x5154 // "QT"
23+
#define PRODUCT_ID 0x0010
924
#define DEVICE_VER 0x0001
10-
#define MANUFACTURER qmkbuilder
11-
#define PRODUCT keyboard
25+
#define MANUFACTURER Quantrik
26+
#define PRODUCT SX60
1227

1328
/* key matrix size */
1429
#define MATRIX_ROWS 5
@@ -18,11 +33,19 @@
1833
/* key matrix pins */
1934
#define MATRIX_ROW_PINS { B1, B2, B3, C6, B6 }
2035
#define MATRIX_COL_PINS { F6, B5, B4, D7, D6, D5, D3, D2 }
36+
// MCP23018 pinout:
37+
// Rows: B4, B3, B2, B1, B0
38+
// Cols: A0, A1, A2, A3, A4, A5, A6, A7
2139
#define UNUSED_PINS
2240

2341
/* COL2ROW or ROW2COL */
2442
#define DIODE_DIRECTION COL2ROW
2543

44+
/* indicator LEDs */
45+
#define LED_NUM_LOCK_PIN F5
46+
#define LED_CAPS_LOCK_PIN F4
47+
#define LED_SCROLL_LOCK_PIN F1
48+
2649
/* number of backlight levels */
2750
#define BACKLIGHT_PIN B7
2851
#ifdef BACKLIGHT_PIN
@@ -37,13 +60,3 @@
3760

3861
/* Locking resynchronize hack */
3962
#define LOCKING_RESYNC_ENABLE
40-
41-
#ifdef RGB_DI_PIN
42-
#define RGBLIGHT_ANIMATIONS
43-
#define RGBLED_NUM 0
44-
#define RGBLIGHT_HUE_STEP 8
45-
#define RGBLIGHT_SAT_STEP 8
46-
#define RGBLIGHT_VAL_STEP 8
47-
#endif
48-
49-
#endif

keyboards/sx60/keymaps/default/config.h

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,35 @@
1-
#include QMK_KEYBOARD_H
1+
/* Copyright 2021 Danny Nguyen <danny@keeb.io>
22
3-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4-
[0] = LAYOUT_ansi_split_bs_rshift( KC_ESC, 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_BSLS, KC_GRV,
5-
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_BSPC,
6-
KC_PGUP, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
7-
KC_PGDN, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP,
8-
KC_END, KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
3+
This program is free software: you can redistribute it and/or modify
4+
it under the terms of the GNU General Public License as published by
5+
the Free Software Foundation, either version 2 of the License, or
6+
(at your option) any later version.
97
10-
[1] = LAYOUT_ansi_split_bs_rshift( RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
11-
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
12-
KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_LPRN, KC_RPRN, KC_GRV, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_TRNS, KC_TRNS,
13-
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
14-
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
15-
};
8+
This program is distributed in the hope that it will be useful,
9+
but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
GNU General Public License for more details.
1612
17-
void matrix_init_user(void) {
18-
}
13+
You should have received a copy of the GNU General Public License
14+
along with this program. If not, see <http://www.gnu.org/licenses/>.
15+
*/
1916

20-
void matrix_scan_user(void) {
21-
}
17+
#include QMK_KEYBOARD_H
2218

23-
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
24-
return true;
25-
}
19+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20+
[0] = LAYOUT_ansi_split_bs_rshift(
21+
KC_GESC, 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_DEL,
22+
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,
23+
KC_PGUP, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
24+
KC_PGDN, 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,
25+
KC_END, KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
26+
),
27+
28+
[1] = LAYOUT_ansi_split_bs_rshift(
29+
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______,
30+
_______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, _______, _______, _______, _______,
31+
_______, _______, _______, KC_MINS, KC_LPRN, KC_RPRN, KC_GRV, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, _______, _______,
32+
_______, _______, _______, _______, _______, _______, _______, KC_END, _______, _______, _______, _______, _______, _______,
33+
BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
34+
),
35+
};
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/* Copyright 2021 Danny Nguyen <danny@keeb.io>
2+
3+
This program is free software: you can redistribute it and/or modify
4+
it under the terms of the GNU General Public License as published by
5+
the Free Software Foundation, either version 2 of the License, or
6+
(at your option) any later version.
7+
8+
This program is distributed in the hope that it will be useful,
9+
but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
GNU General Public License for more details.
12+
13+
You should have received a copy of the GNU General Public License
14+
along with this program. If not, see <http://www.gnu.org/licenses/>.
15+
*/
16+
17+
#include QMK_KEYBOARD_H
18+
19+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20+
[0] = LAYOUT_ansi_split_bs_rshift(
21+
KC_GESC, 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_DEL,
22+
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,
23+
KC_PGUP, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
24+
KC_PGDN, 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,
25+
KC_END, KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
26+
),
27+
28+
[1] = LAYOUT_ansi_split_bs_rshift(
29+
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______,
30+
_______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, _______, _______, _______, _______,
31+
_______, _______, _______, KC_MINS, KC_LPRN, KC_RPRN, KC_GRV, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, _______, _______,
32+
_______, _______, _______, _______, _______, _______, _______, KC_END, _______, _______, _______, _______, _______, _______,
33+
BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
34+
),
35+
36+
[2] = LAYOUT_ansi_split_bs_rshift(
37+
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
38+
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
39+
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
40+
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
41+
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
42+
),
43+
44+
[3] = LAYOUT_ansi_split_bs_rshift(
45+
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
46+
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
47+
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
48+
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
49+
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
50+
)
51+
};
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
VIA_ENABLE = yes
2+
CONSOLE_ENABLE = yes
3+
LTO_ENABLE = yes

keyboards/sx60/readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ Hardware Availability: [geekhack.org/index.php?topic=93665.0](https://geekhack.o
1111

1212
Make example for this keyboard (after setting up your build environment):
1313

14-
make SX60:default
14+
make sx60:default
1515

1616
Or to make and flash:
1717

18-
make SX60:default:dfu
18+
make sx60:default:dfu
1919

2020
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.

0 commit comments

Comments
 (0)