aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcccywj <33842880+cccywj@users.noreply.github.com>2021-05-13 19:48:04 -0700
committerGitHub <noreply@github.com>2021-05-13 19:48:04 -0700
commitba66b63fe583b505cdbcbe290a8efdbd3e6067b2 (patch)
tree600c961300024a98d58ceaf83f640b42fe731378
parenteddd6aa1130ac71b3aeeed7a311a275f27dc2de0 (diff)
downloadqmk_firmware-ba66b63fe583b505cdbcbe290a8efdbd3e6067b2.tar.gz
qmk_firmware-ba66b63fe583b505cdbcbe290a8efdbd3e6067b2.zip
[Keyboard] Add fluxlab zplit keyboard (#12396)
Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Ryan <fauxpark@gmail.com>
-rw-r--r--keyboards/flxlb/zplit/config.h90
-rw-r--r--keyboards/flxlb/zplit/info.json12
-rw-r--r--keyboards/flxlb/zplit/keymaps/via/config.h28
-rw-r--r--keyboards/flxlb/zplit/keymaps/via/keymap.c80
-rw-r--r--keyboards/flxlb/zplit/readme.md13
-rw-r--r--keyboards/flxlb/zplit/rules.mk24
-rw-r--r--keyboards/flxlb/zplit/zplit.c17
-rw-r--r--keyboards/flxlb/zplit/zplit.h37
8 files changed, 301 insertions, 0 deletions
diff --git a/keyboards/flxlb/zplit/config.h b/keyboards/flxlb/zplit/config.h
new file mode 100644
index 000000000..83fe08484
--- /dev/null
+++ b/keyboards/flxlb/zplit/config.h
@@ -0,0 +1,90 @@
1/*
2Copyright 2021 fluxlab
3Copyright 2015 Jack Humbert
4
5This program is free software: you can redistribute it and/or modify
6it under the terms of the GNU General Public License as published by
7the Free Software Foundation, either version 2 of the License, or
8(at your option) any later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#pragma once
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0x7076
25#define PRODUCT_ID 0x0001
26#define DEVICE_VER 0x0001
27#define MANUFACTURER fluxlab
28#define PRODUCT zplit
29
30/* key matrix size */
31// Rows are doubled-up
32#define MATRIX_ROWS 8
33#define MATRIX_COLS 6
34
35// wiring of each half
36#define MATRIX_ROW_PINS { D4, F5, F4, F1 }
37#define MATRIX_COL_PINS { B2, B3, D6, D7, B4, B5 }
38// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order
39
40#define DIODE_DIRECTION COL2ROW
41
42/* define if matrix has ghost */
43//#define MATRIX_HAS_GHOST
44
45/* number of backlight levels */
46// #define BACKLIGHT_LEVELS 3
47
48/* Set 0 if debouncing isn't needed */
49#define DEBOUNCE 5
50
51/* configuration for split keyboard */
52#define SOFT_SERIAL_PIN D0
53#define SELECT_SOFT_SERIAL_SPEED 1
54// #define USE_I2C
55#define SPLIT_USB_DETECT
56#define SPLIT_USB_TIMEOUT 500
57
58#define ENCODERS_PAD_A { B0 }
59#define ENCODERS_PAD_B { D2 }
60
61/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
62#define LOCKING_SUPPORT_ENABLE
63/* Locking resynchronize hack */
64#define LOCKING_RESYNC_ENABLE
65
66/* ws2812 RGB LED */
67#define RGB_DI_PIN D3
68#define RGBLED_NUM 16
69#define RGBLIGHT_LED_MAP { 0, 1, 2, 3, 4, 5, 6, 7, 15, 14, 13, 12, 11, 10, 9, 8}
70#define RGBLED_SPLIT { 8, 8 }
71#define RGBLIGHT_SPLIT
72#define RGBLIGHT_ANIMATIONS
73
74/*
75 * Feature disable options
76 * These options are also useful to firmware size reduction.
77 */
78
79/* disable debug print */
80// #define NO_DEBUG
81
82/* disable print */
83// #define NO_PRINT
84
85/* disable action features */
86//#define NO_ACTION_LAYER
87//#define NO_ACTION_TAPPING
88//#define NO_ACTION_ONESHOT
89//#define NO_ACTION_MACRO
90//#define NO_ACTION_FUNCTION
diff --git a/keyboards/flxlb/zplit/info.json b/keyboards/flxlb/zplit/info.json
new file mode 100644
index 000000000..7cf3f0078
--- /dev/null
+++ b/keyboards/flxlb/zplit/info.json
@@ -0,0 +1,12 @@
1{
2 "keyboard_name": "zplit",
3 "url": "https://github.com/cccywj/qmk_firmware",
4 "maintainer": "flxlb",
5 "width": 13,
6 "height": 4,
7 "layouts": {
8 "LAYOUT": {
9 "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}]
10 }
11 }
12}
diff --git a/keyboards/flxlb/zplit/keymaps/via/config.h b/keyboards/flxlb/zplit/keymaps/via/config.h
new file mode 100644
index 000000000..a157047f7
--- /dev/null
+++ b/keyboards/flxlb/zplit/keymaps/via/config.h
@@ -0,0 +1,28 @@
1/*
2This is the c configuration file for the keymap
3
4Copyright 2012 Jun Wako <wakojun@gmail.com>
5Copyright 2015 Jack Humbert
6
7This program is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation, either version 2 of the License, or
10(at your option) any later version.
11
12This program is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with this program. If not, see <http://www.gnu.org/licenses/>.
19*/
20
21#pragma once
22
23//#define USE_I2C
24
25/* Select hand configuration */
26#define MASTER_LEFT
27// #define MASTER_RIGHT
28// #define EE_HANDS
diff --git a/keyboards/flxlb/zplit/keymaps/via/keymap.c b/keyboards/flxlb/zplit/keymaps/via/keymap.c
new file mode 100644
index 000000000..7f92c80e2
--- /dev/null
+++ b/keyboards/flxlb/zplit/keymaps/via/keymap.c
@@ -0,0 +1,80 @@
1/* Copyright 2021 FluxLab
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// Each layer gets a name for readability, which is then used in the keymap matrix below.
20// The underscores don't mean anything - you can have a layer called STUFF or any other name.
21// Layer names don't all need to be of the same length, obviously, and you can also skip them
22// entirely and just use numbers.
23enum custom_layers {
24 _QWERTY,
25 _LOWER,
26 _RAISE,
27 _ADJUST,
28};
29
30#define LOWER MO(_LOWER)
31#define RAISE MO(_RAISE)
32#define ADJUST MO(_ADJUST)
33
34const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
35/* Qwerty */
36[_QWERTY] = LAYOUT(
37 KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MUTE,
38 KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
39 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT ,
40 KC_LCTL, KC_LGUI, KC_LALT, KC_DEL, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LBRC, KC_RBRC, KC_QUOT, KC_MINS
41),
42
43/* Lower */
44[_LOWER] = LAYOUT(
45 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
46 _______, _______, _______, KC_UP, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______,
47 _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______,KC_1,KC_2,KC_3, KC_BSLS, _______,
48 _______, _______, _______, _______, LOWER, _______, _______, KC_0,KC_0, KC_DOT, KC_BSLS,KC_EQL
49),
50
51/* Raise */
52[_RAISE] = LAYOUT(
53 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
54 RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, _______, RGB_TOG, _______, _______, _______, _______, _______, _______,
55 RGB_HUD, RGB_SAD, RGB_VAD, RGB_RMOD, _______, RGB_TOG, _______, _______, _______, _______, KC_UP, _______,
56 _______, _______, _______, _______, _______, _______, _______, RAISE, _______, KC_LEFT, KC_DOWN, KC_RGHT
57),
58
59/* Adjust (Lower + Raise) */
60[_ADJUST] = LAYOUT(
61 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
62 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
63 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
64 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
65)
66
67
68};
69
70layer_state_t layer_state_set_user(layer_state_t state) {
71 return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
72}
73
74void encoder_update_user(uint8_t index, bool clockwise) {
75 if (clockwise) {
76 tap_code(KC_VOLD);
77 } else {
78 tap_code(KC_VOLU);
79 }
80}
diff --git a/keyboards/flxlb/zplit/readme.md b/keyboards/flxlb/zplit/readme.md
new file mode 100644
index 000000000..e5f88c9df
--- /dev/null
+++ b/keyboards/flxlb/zplit/readme.md
@@ -0,0 +1,13 @@
1# fluxlab zplit
2
3![zplit](https://i.imgur.com/eN4aSG1l.png)
4
5Zplit is a 40% split keyboard inspired by the Zlant and similar to Zinc. It has a symmetrical layout to provide a more natural typing experience.
6
7* Keyboard Maintainer: [flxlb](https://flxlb.ca)
8
9Make example for this keyboard (after setting up your build environment):
10
11 make flxlb/zplit:default
12
13See 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).
diff --git a/keyboards/flxlb/zplit/rules.mk b/keyboards/flxlb/zplit/rules.mk
new file mode 100644
index 000000000..121bba1df
--- /dev/null
+++ b/keyboards/flxlb/zplit/rules.mk
@@ -0,0 +1,24 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5BOOTLOADER = atmel-dfu
6
7# Build Options
8# change yes to no to disable
9#
10BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
11MOUSEKEY_ENABLE = no # Mouse keys
12EXTRAKEY_ENABLE = yes # Audio control and System control
13CONSOLE_ENABLE = no # Console for debug
14COMMAND_ENABLE = yes # Commands for debug and configuration
15# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
16SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
17# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
18NKRO_ENABLE = no # USB Nkey Rollover
19BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
20RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
21BLUETOOTH_ENABLE = no # Enable Bluetooth
22AUDIO_ENABLE = no # Audio output
23ENCODER_ENABLE = yes
24SPLIT_KEYBOARD = yes
diff --git a/keyboards/flxlb/zplit/zplit.c b/keyboards/flxlb/zplit/zplit.c
new file mode 100644
index 000000000..25956640a
--- /dev/null
+++ b/keyboards/flxlb/zplit/zplit.c
@@ -0,0 +1,17 @@
1/* Copyright 2021 FluxLab
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 "zplit.h"
diff --git a/keyboards/flxlb/zplit/zplit.h b/keyboards/flxlb/zplit/zplit.h
new file mode 100644
index 000000000..6a90efa8a
--- /dev/null
+++ b/keyboards/flxlb/zplit/zplit.h
@@ -0,0 +1,37 @@
1 /* Copyright 2021 FluxLab
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
18
19#include "quantum.h"
20
21
22#define LAYOUT( \
23 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
24 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
25 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
26 L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
27 ) \
28 { \
29 { L00, L01, L02, L03, L04, L05 }, \
30 { L10, L11, L12, L13, L14, L15 }, \
31 { L20, L21, L22, L23, L24, L25 }, \
32 { L30, L31, L32, L33, L34, L35 }, \
33 { R05, R04, R03, R02, R01, R00 }, \
34 { R15, R14, R13, R12, R11, R10 }, \
35 { R25, R24, R23, R22, R21, R20 }, \
36 { R35, R34, R33, R32, R31, R30 } \
37 }