summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2023-02-16 16:31:05 +0000
committerQMK Bot <hello@qmk.fm>2023-02-16 16:31:05 +0000
commit86ab1c13315db9db5bfd2328bdf7aeb2e858343b (patch)
treec3d865a42508bb3efa3576ceb4401a537fbf3437
parent242f51007f2a6151da49cebb0d6ac4aa77fa9e19 (diff)
parentbeb9fcb8bcf156337601499d0b0de5f246878808 (diff)
Merge remote-tracking branch 'origin/master' into develop
-rw-r--r--keyboards/quarkeys/z40/config.h74
-rw-r--r--keyboards/quarkeys/z40/info.json69
-rw-r--r--keyboards/quarkeys/z40/keymaps/default/keymap.c102
-rw-r--r--keyboards/quarkeys/z40/keymaps/via/keymap.c68
-rw-r--r--keyboards/quarkeys/z40/keymaps/via/rules.mk2
-rw-r--r--keyboards/quarkeys/z40/readme.md23
-rw-r--r--keyboards/quarkeys/z40/rules.mk17
-rw-r--r--keyboards/quarkeys/z40/z40.c44
-rw-r--r--keyboards/quarkeys/z40/z40.h29
9 files changed, 428 insertions, 0 deletions
diff --git a/keyboards/quarkeys/z40/config.h b/keyboards/quarkeys/z40/config.h
new file mode 100644
index 0000000000..1ca7a35849
--- /dev/null
+++ b/keyboards/quarkeys/z40/config.h
@@ -0,0 +1,74 @@
1/*
2/ Copyright 2022 quarkeys
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/ This program is distributed in the hope that it will be useful,
8/ but WITHOUT ANY WARRANTY; without even the implied warranty of
9/ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10/ GNU General Public License for more details.
11/ You should have received a copy of the GNU General Public License
12/ along with this program. If not, see <http://www.gnu.org/licenses/>.
13*/
14
15#pragma once
16
17#define DIODE_DIRECTION COL2ROW
18
19#define MATRIX_ROW_PINS { E6, B3, C7, C6 }
20#define MATRIX_COL_PINS { F4, F5, F6, F7, B6, B5, B4, D7, D6, D0, B1, B0 }
21#define RGB_DI_PIN F1
22#ifdef RGB_MATRIX_ENABLE
23#define RGB_MATRIX_LED_COUNT 47
24#define RGB_MATRIX_KEYPRESSES // Reacts to Keypresses
25#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
26#define RGB_DISABLE_WHEN_USB_SUSPENDED // Turn off effects when suspended
27#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 130 // Limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
28#define RGB_MATRIX_SAT_STEP 8
29#define RGB_MATRIX_VAL_STEP 8
30#define RGB_MATRIX_SPD_STEP 10
31
32// RGB_MATRIX effects
33#define ENABLE_RGB_MATRIX_ALPHAS_MODS //Enables RGB_MATRIX_ALPHAS_MODS
34#define ENABLE_RGB_MATRIX_BREATHING //Enables RGB_MATRIX_BREATHING
35#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN //Enables RGB_MATRIX_CYCLE_UP_DOWN
36#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON //Enables RGB_MATRIX_RAINBOW_MOVING_CHEVRON
37#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN //Enables RGB_MATRIX_CYCLE_OUT_IN
38#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL //Enables RGB_MATRIX_CYCLE_OUT_IN_DUAL
39#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL //Enables RGB_MATRIX_CYCLE_PINWHEEL
40#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL //Enables RGB_MATRIX_CYCLE_SPIRAL
41#define ENABLE_RGB_MATRIX_DUAL_BEACON //Enables RGB_MATRIX_DUAL_BEACON
42#define ENABLE_RGB_MATRIX_RAINBOW_BEACON //Enables RGB_MATRIX_RAINBOW_BEACON
43#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS //Enables RGB_MATRIX_RAINBOW_PINWHEELS
44
45// RGB_MATRIX reactive effects
46#define ENABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue
47#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out
48#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out
49#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out
50#define ENABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out
51#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out
52#endif
53
54#ifdef RGBLIGHT_ENABLE
55#define RGBLED_NUM 47
56#define RGBLIGHT_HUE_STEP 8
57#define RGBLIGHT_SAT_STEP 8
58#define RGBLIGHT_VAL_STEP 8
59
60#define RGBLIGHT_EFFECT_BREATHING
61#define RGBLIGHT_EFFECT_RAINBOW_MOOD
62#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
63#define RGBLIGHT_EFFECT_SNAKE
64#define RGBLIGHT_EFFECT_KNIGHT
65#define RGBLIGHT_EFFECT_CHRISTMAS
66#define RGBLIGHT_EFFECT_STATIC_GRADIENT
67#define RGBLIGHT_EFFECT_ALTERNATING
68#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2)
69
70#define RGBLIGHT_LAYERS
71#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF
72#define RGBLIGHT_LIMIT_VAL 130
73#define RGBLIGHT_SLEEP
74#endif \ No newline at end of file
diff --git a/keyboards/quarkeys/z40/info.json b/keyboards/quarkeys/z40/info.json
new file mode 100644
index 0000000000..57159669a4
--- /dev/null
+++ b/keyboards/quarkeys/z40/info.json
@@ -0,0 +1,69 @@
1{
2 "keyboard_name": "Z40 Ortho",
3 "manufacturer": "Quarkeys Stuidio",
4 "url": "www.quarkeys.com",
5 "maintainer": "TommyZ",
6 "usb": {
7 "vid": "0x8490",
8 "pid": "0x2801",
9 "device_version": "0.0.1"
10 },
11 "processor": "atmega32u4",
12 "bootloader": "atmel-dfu",
13 "layouts": {
14 "LAYOUT": {
15 "layout": [
16 {"x":0, "y":0},
17 {"x":1, "y":0},
18 {"x":2, "y":0},
19 {"x":3, "y":0},
20 {"x":4, "y":0},
21 {"x":5, "y":0},
22 {"x":6, "y":0},
23 {"x":7, "y":0},
24 {"x":8, "y":0},
25 {"x":9, "y":0},
26 {"x":10, "y":0},
27 {"x":11, "y":0},
28
29 {"x":0, "y":1},
30 {"x":1, "y":1},
31 {"x":2, "y":1},
32 {"x":3, "y":1},
33 {"x":4, "y":1},
34 {"x":5, "y":1},
35 {"x":6, "y":1},
36 {"x":7, "y":1},
37 {"x":8, "y":1},
38 {"x":9, "y":1},
39 {"x":10, "y":1},
40 {"x":11, "y":1},
41
42 {"x":0, "y":2},
43 {"x":1, "y":2},
44 {"x":2, "y":2},
45 {"x":3, "y":2},
46 {"x":4, "y":2},
47 {"x":5, "y":2},
48 {"x":6, "y":2},
49 {"x":7, "y":2},
50 {"x":8, "y":2},
51 {"x":9, "y":2},
52 {"x":10, "y":2},
53 {"x":11, "y":2},
54
55 {"x":0, "y":3},
56 {"x":1, "y":3},
57 {"x":2, "y":3},
58 {"x":3, "y":3},
59 {"x":4, "y":3},
60 {"x":5, "y":3, "w":2},
61 {"x":7, "y":3},
62 {"x":8, "y":3},
63 {"x":9, "y":3},
64 {"x":10, "y":3},
65 {"x":11, "y":3}
66 ]
67 }
68 }
69 } \ No newline at end of file
diff --git a/keyboards/quarkeys/z40/keymaps/default/keymap.c b/keyboards/quarkeys/z40/keymaps/default/keymap.c
new file mode 100644
index 0000000000..e54316ec29
--- /dev/null
+++ b/keyboards/quarkeys/z40/keymaps/default/keymap.c
@@ -0,0 +1,102 @@
1/*
2/ Copyright 2022 quarkeys
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/ This program is distributed in the hope that it will be useful,
8/ but WITHOUT ANY WARRANTY; without even the implied warranty of
9/ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10/ GNU General Public License for more details.
11/ You should have received a copy of the GNU General Public License
12/ along with this program. If not, see <http://www.gnu.org/licenses/>.
13*/
14
15#include QMK_KEYBOARD_H
16
17const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
18 /* [0]
19 * ,-------------------------------------------------------------------------------------.
20 * | Esc | Q | W | E | R | T | Y | U | I | O | P | BS |
21 * |------------+------+------+------+------+-------------+------+------+------+------+--|
22 * | Tab | A | S | D | F | G | H | J | K | L | ; | " |
23 * |------------+------+------+------+------+------|------+------+------+------+------+--|
24 * | SHIFT | Z | X | C | V | B | N | M | , | . | / | Shift |
25 * |-------+-------+-------+-------+-------+-------+------+------+------+------+------+--|
26 * | Ctrl | Caps | ALT | OS | Ly1 | SPACE | Ly2 | M1 | M2 | M3 | Enter |
27 * `-------------------------------------------------------------------------------------'
28 */
29 [0] = LAYOUT(
30 KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
31 KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
32 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
33 KC_LCTL, KC_CAPS, KC_LALT, KC_LGUI, MO(1), KC_SPC, MO(2), MO(3), _______, _______, KC_ENT
34 ),
35
36 /* [1]
37 * ,-------------------------------------------------------------------------------------.
38 * | Reset | PgUp | Home | Up | End | Del | \ | 7 | 8 | 9 | RGBtg | BS |
39 * |-------+------+------+------+------+------+------+------+------+------+-------+------|
40 * | | PgDn | Left | Down | Rght | + | - | 4 | 5 | 6 | RGBmod| |
41 * |-------+------+------+------+------+------+------+------+------+------+-------+------|
42 * | | Vol- | Vol+ | Play | Mute | * | / | 1 | 2 | 3 | / | |
43 * |-------+------+------+------+------+------+------+------+------+------+-------+------|
44 * | | | | | | 0 | | | . | | = |
45 * `-------+------+------+------+------+-------------+------+------+------+-------+------'
46 */
47
48 [1] = LAYOUT(
49 QK_BOOT, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, KC_BSLS, KC_7, KC_8, KC_9, RGB_TOG, _______,
50 _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_PLUS, KC_MINS, KC_4, KC_5, KC_6, RGB_MOD, _______,
51 _______, KC_VOLD, KC_VOLU, _______, _______, KC_ASTR, KC_SLSH, KC_1, KC_2, KC_3, RGB_HUI, _______,
52 RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, KC_0, _______, _______, KC_DOT, RGB_HUD, KC_EQL
53 ),
54
55 /* [2]
56 * ,-------------------------------------------------------------------------------------.
57 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
58 * |------+------+------+------+------+------+------+------+------+------+----+--+-------|
59 * | | & | | | ( | ) | | | { | } | [ | ] | |
60 * |------+------+------+------+------+------+------+------+------+------+-------+-------|
61 * | | ! | @ | # | ^ | | | ~ | < | > | ? | |
62 * |------+------+------+------+------+------+------+------+------+------+-------+-------|
63 * | | | | | | | | | | | |
64 * `-------------------------------------------------------------------------------------'
65 */
66 [2] = LAYOUT(
67 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
68 _______, KC_AMPR, KC_PIPE, KC_LPRN, KC_RPRN, KC_PLUS, KC_MINS, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, _______,
69 _______, KC_EXLM, KC_AT, KC_HASH, KC_CIRC, KC_ASTR, KC_SLSH, KC_TILD, KC_LABK, KC_RABK, KC_QUES, _______,
70 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
71 )
72};
73
74#ifdef RGBLIGHT_ENABLE
75const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS({9, 1, HSV_RED});
76const rgblight_segment_t PROGMEM my_ar_numpad_layer[] = RGBLIGHT_LAYER_SEGMENTS({40, 2, HSV_WHITE});
77const rgblight_segment_t PROGMEM my_symbol_layer[] = RGBLIGHT_LAYER_SEGMENTS({28, 2, HSV_WHITE});
78const rgblight_segment_t PROGMEM my_other_layer[] = RGBLIGHT_LAYER_SEGMENTS({16, 2, HSV_WHITE});
79
80const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
81 my_capslock_layer, // Caplock indicator
82 my_ar_numpad_layer, // Arrow keys & Numpad, Operator keys, reset key, RGB control and media control
83 my_symbol_layer, // F1-F12 keys & Symbols
84 my_other_layer // Self-Defined
85);
86
87void keyboard_post_init_user(void) {
88 rgblight_layers = my_rgb_layers;
89}
90
91bool led_update_user(led_t led_state) {
92 rgblight_set_layer_state(0, led_state.caps_lock);
93 return true;
94}
95
96layer_state_t layer_state_set_user(layer_state_t state) {
97 rgblight_set_layer_state(1, layer_state_cmp(state, 1));
98 rgblight_set_layer_state(2, layer_state_cmp(state, 2));
99 rgblight_set_layer_state(3, layer_state_cmp(state, 3));
100 return state;
101}
102#endif
diff --git a/keyboards/quarkeys/z40/keymaps/via/keymap.c b/keyboards/quarkeys/z40/keymaps/via/keymap.c
new file mode 100644
index 0000000000..f235747a70
--- /dev/null
+++ b/keyboards/quarkeys/z40/keymaps/via/keymap.c
@@ -0,0 +1,68 @@
1/*
2/ Copyright 2022 quarkeys
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/ This program is distributed in the hope that it will be useful,
8/ but WITHOUT ANY WARRANTY; without even the implied warranty of
9/ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10/ GNU General Public License for more details.
11/ You should have received a copy of the GNU General Public License
12/ along with this program. If not, see <http://www.gnu.org/licenses/>.
13*/
14
15#include QMK_KEYBOARD_H
16
17const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
18 [0] = LAYOUT(
19 KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
20 KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
21 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
22 KC_LCTL, KC_CAPS, KC_LALT, KC_LGUI, MO(1), KC_SPC, MO(2), MO(3), _______, _______, KC_ENT
23 ),
24
25 [1] = LAYOUT(
26 QK_BOOT, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, KC_BSLS, KC_7, KC_8, KC_9, RGB_TOG, _______,
27 _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_PLUS, KC_MINS, KC_4, KC_5, KC_6, RGB_MOD, _______,
28 _______, KC_VOLD, KC_VOLU, _______, _______, KC_ASTR, KC_SLSH, KC_1, KC_2, KC_3, RGB_HUI, _______,
29 RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, KC_0, _______, _______, KC_DOT, RGB_HUD, KC_EQL
30 ),
31
32 [2] = LAYOUT(
33 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
34 _______, KC_AMPR, KC_PIPE, KC_LPRN, KC_RPRN, KC_PLUS, KC_MINS, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, _______,
35 _______, KC_EXLM, KC_AT, KC_HASH, KC_CIRC, KC_ASTR, KC_SLSH, KC_TILD, KC_LABK, KC_RABK, KC_QUES, _______,
36 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
37 )
38};
39
40#ifdef RGBLIGHT_ENABLE
41const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS({9, 1, HSV_RED});
42const rgblight_segment_t PROGMEM my_ar_numpad_layer[] = RGBLIGHT_LAYER_SEGMENTS({40, 2, HSV_WHITE});
43const rgblight_segment_t PROGMEM my_symbol_layer[] = RGBLIGHT_LAYER_SEGMENTS({28, 2, HSV_WHITE});
44const rgblight_segment_t PROGMEM my_other_layer[] = RGBLIGHT_LAYER_SEGMENTS({16, 2, HSV_WHITE});
45
46const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
47 my_capslock_layer, // Caplock indicator
48 my_ar_numpad_layer, // Arrow keys & Numpad, Operator keys, reset key, RGB control and media control
49 my_symbol_layer, // F1-F12 keys & Symbols
50 my_other_layer // Self-Defined
51);
52
53void keyboard_post_init_user(void) {
54 rgblight_layers = my_rgb_layers;
55}
56
57bool led_update_user(led_t led_state) {
58 rgblight_set_layer_state(0, led_state.caps_lock);
59 return true;
60}
61
62layer_state_t layer_state_set_user(layer_state_t state) {
63 rgblight_set_layer_state(1, layer_state_cmp(state, 1));
64 rgblight_set_layer_state(2, layer_state_cmp(state, 2));
65 rgblight_set_layer_state(3, layer_state_cmp(state, 3));
66 return state;
67}
68#endif
diff --git a/keyboards/quarkeys/z40/keymaps/via/rules.mk b/keyboards/quarkeys/z40/keymaps/via/rules.mk
new file mode 100644
index 0000000000..36b7ba9cbc
--- /dev/null
+++ b/keyboards/quarkeys/z40/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
1VIA_ENABLE = yes
2LTO_ENABLE = yes
diff --git a/keyboards/quarkeys/z40/readme.md b/keyboards/quarkeys/z40/readme.md
new file mode 100644
index 0000000000..d3428dd206
--- /dev/null
+++ b/keyboards/quarkeys/z40/readme.md
@@ -0,0 +1,23 @@
1# Quarkeys Z40 Low Profile Keyboard
2
3![Quarkeys Z40 Pastry](https://raw.githubusercontent.com/tommyamoszhao/keyboardimage/main/Z40/Z40_1024.png)
4
5A 40% Bottom mount low-profile & MX switch compatible keyboard.
6
7* Keyboard Maintainer: [Quarkeys Studio](www.quarkeys.com)
8* Hardware Supported: Z40-ACR, Z40-Pastry
9* Hardware Specs: Per-key RGBs, layer & Capslock indicators
10* For [RGB Matrix feature](https://docs.qmk.fm/#/feature_rgb_matrix): `RGB_MATRIX_ENABLE = yes`, `RGBLIGHT_ENABLE = no`.
11* For [RGB Light feature](https://docs.qmk.fm/#/feature_rgblight): `RGB_MATRIX_ENABLE = no`, `RGBLIGHT_ENABLE = yes`.
12
13Make example for this keyboard solder version keymap(after setting up your build environment):
14
15 make quarkeys/z40:default
16
17Flashing example for this keyboard:
18
19 make quarkeys/z40:default:flash
20
21**Bootloader:** Press the `QK_BOOT` keycode at ESC position of layer 1.
22
23See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file
diff --git a/keyboards/quarkeys/z40/rules.mk b/keyboards/quarkeys/z40/rules.mk
new file mode 100644
index 0000000000..89107d24a8
--- /dev/null
+++ b/keyboards/quarkeys/z40/rules.mk
@@ -0,0 +1,17 @@
1# Build Options
2# change yes to no to disable
3#
4BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
5MOUSEKEY_ENABLE = yes # Mouse keys
6EXTRAKEY_ENABLE = yes # Audio control and System control
7CONSOLE_ENABLE = no # Console for debug
8COMMAND_ENABLE = no # Commands for debug and configuration
9NKRO_ENABLE = yes # Enable N-Key Rollover
10BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
11AUDIO_ENABLE = no # Audio output
12
13# Do not enable RGB_MATRIX_ENABLE together with RGBLIGHT_ENABLE
14RGBLIGHT_ENABLE = no # Enable this and unable RGB_MATRIX_ENABLE to use RGB light effect
15
16RGB_MATRIX_ENABLE = yes # Enable this and unable RGBLIGHT_ENABLE to use RGB Matrix effect
17RGB_MATRIX_DRIVER = WS2812 # Comment out this line when RGBLIGHTING is enabled
diff --git a/keyboards/quarkeys/z40/z40.c b/keyboards/quarkeys/z40/z40.c
new file mode 100644
index 0000000000..9bc188f04f
--- /dev/null
+++ b/keyboards/quarkeys/z40/z40.c
@@ -0,0 +1,44 @@
1/*
2/ Copyright 2022 quarkeys
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/ This program is distributed in the hope that it will be useful,
8/ but WITHOUT ANY WARRANTY; without even the implied warranty of
9/ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10/ GNU General Public License for more details.
11/ You should have received a copy of the GNU General Public License
12/ along with this program. If not, see <http://www.gnu.org/licenses/>.
13*/
14
15
16#include "z40.h"
17#ifdef RGB_MATRIX_ENABLE
18led_config_t g_led_config = { {
19 // Key Matrix to LED Index
20 /*
21 { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \
22 { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B }, \
23 { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \
24 { k30, k31, k32, k33, k34, k35, XXX, k36, k37, k38, k39, k3A }\
25 */
26 { 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35 },
27 { 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23 },
28 { 22, 21, 20, 29, 18, 17, 16, 15, 14, 13, 12, 11 },
29 { 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }
30 },
31 { // Index to Physical Position
32 {225, 64}, {200, 64}, {180, 64}, {160, 64}, {140, 64}, {110, 64}, { 80, 64}, { 60, 64}, { 40, 64}, { 20, 64}, { 0, 64},
33 {225, 42}, {200, 42}, {180, 42}, {160, 42}, {140, 42}, {120, 42}, {100, 42}, { 80, 42}, { 60, 42}, { 40, 42}, { 20, 42}, { 0, 42},
34 {225, 21}, {200, 21}, {180, 21}, {160, 21}, {140, 21}, {120, 21}, {100, 21}, { 80, 21}, { 60, 21}, { 40, 21}, { 20, 21}, { 0, 21},
35 {225, 0}, {200, 0}, {180, 0}, {160, 0}, {140, 0}, {120, 0}, {100, 0}, { 80, 0}, { 60, 0}, { 40, 0}, { 20, 0}, { 0, 0}
36 },
37 {
38 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
39 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
40 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
41 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1
42 }
43};
44#endif
diff --git a/keyboards/quarkeys/z40/z40.h b/keyboards/quarkeys/z40/z40.h
new file mode 100644
index 0000000000..9a599d9cd1
--- /dev/null
+++ b/keyboards/quarkeys/z40/z40.h
@@ -0,0 +1,29 @@
1/*
2/ Copyright 2022 quarkeys
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/ This program is distributed in the hope that it will be useful,
8/ but WITHOUT ANY WARRANTY; without even the implied warranty of
9/ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10/ GNU General Public License for more details.
11/ You should have received a copy of the GNU General Public License
12/ along with this program. If not, see <http://www.gnu.org/licenses/>.
13*/
14
15#pragma once
16#include "quantum.h"
17#define XXX KC_NO
18
19#define LAYOUT( \
20 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \
21 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, \
22 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \
23 k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A \
24) { \
25 { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \
26 { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B }, \
27 { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \
28 { k30, k31, k32, k33, k34, k35, XXX, k36, k37, k38, k39, k3A }\
29}