summaryrefslogtreecommitdiff
path: root/keyboards/cxt_studio
diff options
context:
space:
mode:
authorColin Kinloch <colin@kinlo.ch>2023-02-09 21:29:23 +0000
committerGitHub <noreply@github.com>2023-02-09 13:29:23 -0800
commit462ab3c4d23615b0a80a19b18ab7c69cf8904313 (patch)
tree2ce8c17f8666838346032b9d0b330f820d254d85 /keyboards/cxt_studio
parent1b3b1427d2eee2e64c872aa0a6c403dbd06defa2 (diff)
[Keyboard] Add CXT Studio (#19531)
Co-authored-by: jack <0x6a73@protonmail.com> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Colin Kinloch <colin.kinloch@collabora.com>
Diffstat (limited to 'keyboards/cxt_studio')
-rw-r--r--keyboards/cxt_studio/config.h48
-rw-r--r--keyboards/cxt_studio/cxt_studio.c55
-rw-r--r--keyboards/cxt_studio/info.json76
-rw-r--r--keyboards/cxt_studio/keymaps/default/keymap.json13
-rw-r--r--keyboards/cxt_studio/readme.md27
-rw-r--r--keyboards/cxt_studio/rules.mk1
6 files changed, 220 insertions, 0 deletions
diff --git a/keyboards/cxt_studio/config.h b/keyboards/cxt_studio/config.h
new file mode 100644
index 0000000000..82a60de39b
--- /dev/null
+++ b/keyboards/cxt_studio/config.h
@@ -0,0 +1,48 @@
+// Copyright 2023 Colin Kinloch (@ColinKinloch)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#define RGB_MATRIX_LED_COUNT 12
+#define RGB_DI_PIN F7
+
+#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_TYPING_HEATMAP
+
+#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+
+#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
+#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
+#define ENABLE_RGB_MATRIX_MULTISPLASH
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
+
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
+#define ENABLE_RGB_MATRIX_SPLASH
+#define ENABLE_RGB_MATRIX_MULTISPLASH
+#define ENABLE_RGB_MATRIX_SOLID_SPLASH
+#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
+
+#define RGB_MATRIX_TYPING_HEATMAP_SPREAD 9
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
diff --git a/keyboards/cxt_studio/cxt_studio.c b/keyboards/cxt_studio/cxt_studio.c
new file mode 100644
index 0000000000..2e7622ff91
--- /dev/null
+++ b/keyboards/cxt_studio/cxt_studio.c
@@ -0,0 +1,55 @@
+// Copyright 2023 Colin Kinloch (@ColinKinloch)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include QMK_KEYBOARD_H
+
+static uint8_t anim = 0;
+
+#ifdef ENCODER_ENABLE
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) {
+ return false;
+ }
+ switch (index) {
+ case 0: {
+ if (clockwise) {
+ tap_code_delay(KC_VOLU, 10);
+ } else {
+ tap_code_delay(KC_VOLD, 10);
+ }
+ }
+ break;
+ case 1: {
+ if (clockwise) {
+ rgblight_increase_hue();
+ } else {
+ rgblight_decrease_hue();
+ }
+ }
+ break;
+ case 2: {
+ if (clockwise) {
+ rgblight_increase_val();
+ } else {
+ rgblight_decrease_val();
+ }
+ }
+ break;
+ case 3: {
+ if (clockwise) {
+ anim++;
+ } else {
+ anim--;
+ }
+ if (anim >= RGB_MATRIX_EFFECT_MAX) {
+ anim = 0;
+ } else if (anim < 0) {
+ anim = RGB_MATRIX_EFFECT_MAX - 1;
+ }
+ rgblight_mode(anim);
+ }
+ break;
+ }
+ return true;
+}
+#endif
diff --git a/keyboards/cxt_studio/info.json b/keyboards/cxt_studio/info.json
new file mode 100644
index 0000000000..35e8031819
--- /dev/null
+++ b/keyboards/cxt_studio/info.json
@@ -0,0 +1,76 @@
+{
+ "manufacturer": "CXT",
+ "keyboard_name": "cxt_studio",
+ "maintainer": "ColinKinloch",
+ "bootloader": "atmel-dfu",
+ "diode_direction": "ROW2COL",
+ "features": {
+ "bootmagic": true,
+ "command": false,
+ "console": true,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true,
+ "encoder": true,
+ "rgb_matrix": true
+ },
+ "matrix_pins": {
+ "cols": ["D4", "D7", "B4", "B5"],
+ "rows": ["C7", "C6", "D6", "F4"]
+ },
+ "encoder": {
+ "rotary": [
+ { "pin_a": "D5", "pin_b": "D3" },
+ { "pin_a": "B2", "pin_b": "B3" },
+ { "pin_a": "F5", "pin_b": "F6" },
+ { "pin_a": "E6", "pin_b": "F0" }
+ ]
+ },
+ "processor": "atmega32u4",
+ "rgb_matrix": {
+ "driver": "WS2812",
+ "layout": [
+ { "flags": 4, "matrix": [0, 3], "x": 3, "y": 0 },
+ { "flags": 4, "matrix": [0, 2], "x": 2, "y": 0 },
+ { "flags": 4, "matrix": [0, 1], "x": 1, "y": 0 },
+ { "flags": 4, "matrix": [0, 0], "x": 0, "y": 0 },
+ { "flags": 4, "matrix": [1, 0], "x": 0, "y": 1 },
+ { "flags": 4, "matrix": [1, 1], "x": 1, "y": 1 },
+ { "flags": 4, "matrix": [1, 2], "x": 2, "y": 1 },
+ { "flags": 4, "matrix": [1, 3], "x": 3, "y": 1 },
+ { "flags": 4, "matrix": [2, 3], "x": 3, "y": 2 },
+ { "flags": 4, "matrix": [2, 2], "x": 2, "y": 2 },
+ { "flags": 4, "matrix": [2, 1], "x": 1, "y": 2 },
+ { "flags": 4, "matrix": [2, 0], "x": 0, "y": 2 }
+ ]
+ },
+ "url": "",
+ "usb": {
+ "device_version": "1.0.0",
+ "pid": "0x0000",
+ "vid": "0xFEED"
+ },
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ { "matrix": [0, 0], "x": 0, "y": 0 },
+ { "matrix": [0, 1], "x": 1, "y": 0 },
+ { "matrix": [0, 2], "x": 2, "y": 0 },
+ { "matrix": [0, 3], "x": 3, "y": 0 },
+ { "matrix": [1, 0], "x": 0, "y": 1 },
+ { "matrix": [1, 1], "x": 1, "y": 1 },
+ { "matrix": [1, 2], "x": 2, "y": 1 },
+ { "matrix": [1, 3], "x": 3, "y": 1 },
+ { "matrix": [2, 0], "x": 0, "y": 2 },
+ { "matrix": [2, 1], "x": 1, "y": 2 },
+ { "matrix": [2, 2], "x": 2, "y": 2 },
+ { "matrix": [2, 3], "x": 3, "y": 2 },
+
+ { "matrix": [3, 0], "x": 0, "y": 3 },
+ { "matrix": [3, 1], "x": 1, "y": 3 },
+ { "matrix": [3, 2], "x": 2, "y": 3 },
+ { "matrix": [3, 3], "x": 3, "y": 3 }
+ ]
+ }
+ }
+}
diff --git a/keyboards/cxt_studio/keymaps/default/keymap.json b/keyboards/cxt_studio/keymaps/default/keymap.json
new file mode 100644
index 0000000000..77b4cabc92
--- /dev/null
+++ b/keyboards/cxt_studio/keymaps/default/keymap.json
@@ -0,0 +1,13 @@
+{
+ "keyboard": "cxt_studio",
+ "keymap": "default",
+ "layout": "LAYOUT",
+ "layers": [
+ [
+ "KC_ESC", "KC_F11", "KC_NO", "KC_MSTP",
+ "KC_NO", "KC_NO", "KC_MRWD", "KC_MFFD",
+ "KC_NO", "KC_MPLY", "KC_MPLY", "KC_MNXT",
+ "KC_MUTE", "KC_NO", "KC_NO", "RGB_TOG"
+ ]
+ ]
+}
diff --git a/keyboards/cxt_studio/readme.md b/keyboards/cxt_studio/readme.md
new file mode 100644
index 0000000000..6397a3fdfd
--- /dev/null
+++ b/keyboards/cxt_studio/readme.md
@@ -0,0 +1,27 @@
+# cxt_studio
+
+![cxt_studio](https://i.imgur.com/AMCTioSh.jpeg)
+
+3x4 ortho rgb lighting 4 knobs.
+
+* Keyboard Maintainer: [Colin Kinloch](https://github.com/ColinKinloch)
+* Hardware Supported: CXT-Studio
+* Hardware Availability: AliExpress. I think the manufacturer is on Taobao.
+
+Make example for this keyboard (after setting up your build environment):
+
+ make cxt_studio:default
+
+Flashing example for this keyboard:
+
+ make cxt_studio:default:flash
+
+See 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).
+
+## Bootloader
+
+Enter the bootloader in 3 ways:
+
+* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
+* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
+* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
diff --git a/keyboards/cxt_studio/rules.mk b/keyboards/cxt_studio/rules.mk
new file mode 100644
index 0000000000..6e7633bfe0
--- /dev/null
+++ b/keyboards/cxt_studio/rules.mk
@@ -0,0 +1 @@
+# This file intentionally left blank