From 1468c1493e5fd9036071a0b5e018932aeba1b4ce Mon Sep 17 00:00:00 2001 From: bullwinkle3000 <91431084+bullwinkle3000@users.noreply.github.com> Date: Tue, 16 Jul 2024 15:17:09 -0400 Subject: [PATCH] Added 3x5_mini_track and adjusted 4x7 --- .../3x5_mini_3_track/3x5_mini_3_track.c | 18 ++ .../3x5_mini_3_track/3x5_mini_3_track.h | 79 +++++ .../trackball/3x5_mini_3_track/config.h | 142 +++++++++ .../trackball/3x5_mini_3_track/info.json | 238 +++++++++++++++ .../3x5_mini_3_track/keymaps/vial/config.h | 8 + .../3x5_mini_3_track/keymaps/vial/keymap.c | 287 ++++++++++++++++++ .../3x5_mini_3_track/keymaps/vial/rules.mk | 9 + .../3x5_mini_3_track/keymaps/vial/vial.json | 136 +++++++++ .../trackball/3x5_mini_3_track/mcuconf.h | 18 ++ .../trackball/3x5_mini_3_track/rules.mk | 23 ++ .../4x7_whole_track/keymaps/vial/keymap.c | 2 +- 11 files changed, 959 insertions(+), 1 deletion(-) create mode 100644 keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/3x5_mini_3_track.c create mode 100644 keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/3x5_mini_3_track.h create mode 100644 keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/config.h create mode 100644 keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/info.json create mode 100644 keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/keymaps/vial/config.h create mode 100644 keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/keymaps/vial/keymap.c create mode 100644 keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/keymaps/vial/rules.mk create mode 100644 keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/keymaps/vial/vial.json create mode 100644 keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/mcuconf.h create mode 100644 keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/rules.mk diff --git a/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/3x5_mini_3_track.c b/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/3x5_mini_3_track.c new file mode 100644 index 00000000000..2464185269e --- /dev/null +++ b/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/3x5_mini_3_track.c @@ -0,0 +1,18 @@ +/* +Copyright 2021 @dlford + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include "3x5_mini_3_track.h" + diff --git a/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/3x5_mini_3_track.h b/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/3x5_mini_3_track.h new file mode 100644 index 00000000000..10c0cadca63 --- /dev/null +++ b/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/3x5_mini_3_track.h @@ -0,0 +1,79 @@ +/* +Copyright 2021 @dlford + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +// STANDARD TRACKBALL 3-KEY SOCKET ON RIGHT +/* #define LAYOUT_split_3x5_3( \ +// L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ +// L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ +// L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ +// L32, L33, L34, R30, \ +// R31, \ +// R32 \ +//) { \ +// { L00, L01, L02, L03, L04 }, \ +// { L10, L11, L12, L13, L14 }, \ +// { L20, L21, L22, L23, L24 }, \ +// { XXX, XXX, L32, L33, L34 }, \ +// { R00, R01, R02, R03, R04 }, \ +// { R10, R11, R12, R13, R14 }, \ +// { R20, R21, R22, R23, R24 }, \ +// { R30, R31, R32, XXX, XXX } \ +//} + */ + +// TRACKBALL IN WALL SETUP +#define LAYOUT_split_3x5_3( \ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, L35, R33, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ + L32, L33, L34, R30, R31, R32, \ + L30, L31 \ +) { \ + { L00, L01, L02, L03, L04, XXX }, \ + { L10, L11, L12, L13, L14, XXX }, \ + { L20, L21, L22, L23, L24, XXX }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R00, R01, R02, R03, R04, XXX }, \ + { R10, R11, R12, R13, R14, XXX }, \ + { R20, R21, R22, R23, R24, XXX }, \ + { R30, R31, R32, R33, XXX, XXX } \ +} + +// TRACKBALL IN WALL SETUP WITH MINI LEFT SETUP +//#define LAYOUT_split_3x5_3( \ +// L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ +// L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ +// L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ +// L32, L33, L34, R30, R31, R32, \ +// L30, L31 \ +//) { \ +// { L00, L01, L02, L03, L04 }, \ +// { L10, L11, L12, L13, L14 }, \ +// { L20, L21, L22, L23, L24 }, \ +// { L30, L31, L32, L33, L34 }, \ +// { R00, R01, R02, R03, R04 }, \ +// { R10, R11, R12, R13, R14 }, \ +// { R20, R21, R22, R23, R24 }, \ +// { R30, R31, R32, XXX, XXX } \ +//} + diff --git a/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/config.h b/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/config.h new file mode 100644 index 00000000000..d119b9523b5 --- /dev/null +++ b/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/config.h @@ -0,0 +1,142 @@ +// Dactyl Manuform Hotswap +#pragma once + +//#include "config_common.h" +// Basic Config + +#ifndef WYLD_QMK_FIRMWARE_CONFIG_H +#define WYLD_QMK_FIRMWARE_CONFIG_H + +#endif // WYLD_QMK_FIRMWARE_CONFIG_H +//#define BOOTMAGIC_LITE_ROW 0 // TOP RIGHT KEY ON RIGHT SIDE, TOP LEFT KEY ON LEFT SIDE +//#define BOOTMAGIC_LITE_COLUMN 4 + +//#define PRODUCT_ID 0x0002 + +#define USE_SERIAL +#define SPLIT_HAND_PIN GP26 // high = left, low = right + +#define SPLIT_LAYER_STATE_ENABLE +// Using Serial instead of I2C +#define SERIAL_USART_FULL_DUPLEX +#define SERIAL_USART_TX_PIN GP0 +#define SERIAL_USART_RX_PIN GP1 +#define SERIAL_PIO_USE_PIO0 +#define SERIAL_USART_TIMEOUT 100 // USART driver timeout. default 100 +#define SERIAL_USART_SPEED 921600 +#define SERIAL_USART_PIN_SWAP + +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 200U +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED_MASK 0U + +/* key matrix size */ +// Columns are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +//#define MATRIX_COL_PINS_RIGHT { GP6, GP5, GP4, GP3, GP2 } +#define MATRIX_COL_PINS { GP2, GP3, GP4, GP5, GP6, GP7 } +#define MATRIX_ROW_PINS { GP9, GP10, GP11, GP12 } +//#define MATRIX_COL_PINS_RIGHT { GP6, GP5, GP4, GP3, GP2, GP8 } // Added GP7 so each has 6 columns +//#define MATRIX_ROW_PINS_RIGHT { GP9, GP10, GP11, GP12, GP13 } + +#define DIODE_DIRECTION COL2ROW + +#define SPLIT_LAYER_STATE_ENABLE +#define SPLIT_POINTING_ENABLE +#define POINTING_DEVICE_INVERT_Y +#define ROTATIONAL_TRANSFORM_ANGLE -25 +#define POINTING_DEVICE_RIGHT +// #define POINTING_DEVICE_COMBINED +#define PMW33XX_CS_PIN GP21 +#define POINTING_DEVICE_TASK_THROTTLE_MS 1 +#define PMW33XX_LIFTOFF_DISTANCE 0x02 + +#define SPLIT_TRANSACTION_IDS_KB RPC_ID_KB_CONFIG_SYNC + +#define POINTING_DEVICE_AUTO_MOUSE_ENABLE +// only required if not setting mouse layer elsewhere +#define AUTO_MOUSE_DEFAULT_LAYER 3 + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +#ifdef ENCODER_ENABLE +#define ENCODERS_PAD_A { GP27 } +#define ENCODERS_PAD_B { GP28 } +#define ENCODER_RESOLUTIONS { 2 } +//#define ENCODERS_PAD_A_RIGHT { GP16 } +//#define ENCODERS_PAD_B_RIGHT { GP17 } +//#define ENCODER_RESOLUTIONS_RIGHT { 2 } +#endif + +//#define CHARYBDIS_MINIMUM_DEFAULT_DPI 1200 +//#define CHARYBDIS_DEFAULT_DPI_CONFIG_STEP 200 +//#define CHARYBDIS_MINIMUM_SNIPING_DPI 400 +//#define CHARYBDIS_SNIPING_DPI_CONFIG_STEP 200 + +//// Rotary Encoder //// +// GP21 +// GP22 + +//// Sensor Notes //// +//// Pi Pico pins //// +// 3V3 -- Power (not 3v3_EN!) +// GP21 -- CS pin +// GP20 -- MISO pin +// GP19 -- MOSI pin +// GP18 -- SCK pin clock +// GND -- GND + +#ifdef RGBLIGHT_ENABLE +#define WS2812_PIO_USE_PIO1 +//#define WS2812_PIO_USE_PIO1 +//#define WS2812_PIO_USE_PIO1 +#define RGBLIGHT_LAYERS +#define WS2812_DI_PIN GP22 // can use trackball jack if not used +//#define WS2812_EXTERNAL_PULLUP +#define RGBLED_NUM 24 +//#define DRIVER_LED_TOTAL 34 +#define RGBLED_SPLIT { 12, 12 } +#define RGBLIGHT_SPLIT +#define RGBLIGHT_EFFECT_RGB_TEST +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_SNAKE +#define RGBLIGHT_EFFECT_TWINKLE +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 17 +#define RGBLIGHT_LIMIT_VAL 100 +//#define STM32_SYSCLK KINETIS_SYSCLK_FREQUENCY +#define NOP_FUDGE 0.4 // may not be needed if ws driver loaded +#endif + +//// OLED Pins and Driver +#ifdef OLED_ENABLE +#define I2C_DRIVER I2CD0 +#define I2C1_SDA_PIN GP16 +#define I2C1_SCL_PIN GP17 +// OLED Options +#define SPLIT_OLED_ENABLE +//#define SPLIT_MODS_ENABLE +#define SPLIT_WPM_ENABLE +#define OLED_DISPLAY_WIDTH 128 +#define OLED_DISPLAY_HEIGHT 32 +#define OLED_MATRIX_SIZE 512 +#define OLED_RESET -1 +#define OLED_DISPLAY_ADDRESS 0x3C +#define OLED_BRIGHTNESS 255 +#define OLED_TIMEOUT 32000 +#define OLED_FADE_OUT +#define OLED_FADE_OUT_INTERVAL 0 +#endif + +// Misc settings +// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap +#define LOCKING_SUPPORT_ENABLE +// Locking resynchronize hack +#define LOCKING_RESYNC_ENABLE +// Enables This makes it easier for fast typists to use dual-function keys +#define PERMISSIVE_HOLD +// End of Basic Config diff --git a/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/info.json b/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/info.json new file mode 100644 index 00000000000..fdbdfc72c1a --- /dev/null +++ b/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/info.json @@ -0,0 +1,238 @@ +{ + "keyboard_name": "Dactyl-Manuform Wyld Trackball (3x5_mini_3_track)", + "manufacturer": "wylderbuilds", + "url": "https://wylderbuilds.com", + "maintainer": "qmk", + "processor": "RP2040", + "usb": { + "vid": "0x9953", + "pid": "0x0212", + "device_version": "0.0.1" + }, + "width": 18, + "height": 8, + "matrix": { + "rows": 8, + "cols": 6 + }, + "split": { + "enabled": true + }, + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": false + }, + "matrix_size": { + "cols": 6, + "rows": 8 + }, + "layouts": { + "LAYOUT_split_3x5_3": { + "layout": [ + { + "label": "0,1", + "x": 2, + "y": 0 + }, + { + "label": "0,2", + "x": 3, + "y": 0 + }, + { + "label": "0,3", + "x": 4, + "y": 0 + }, + { + "label": "0,4", + "x": 5, + "y": 0 + }, + { + "label": "4,0", + "x": 11.25, + "y": 0 + }, + { + "label": "4,1", + "x": 12.25, + "y": 0 + }, + { + "label": "4,2", + "x": 13.25, + "y": 0 + }, + { + "label": "4,3", + "x": 14.25, + "y": 0 + }, + { + "label": "0,0", + "x": 1, + "y": 0.5 + }, + { + "label": "4,4", + "x": 15.25, + "y": 0.5 + }, + { + "label": "1,1", + "x": 2, + "y": 1 + }, + { + "label": "1,2", + "x": 3, + "y": 1 + }, + { + "label": "1,3", + "x": 4, + "y": 1 + }, + { + "label": "1,4", + "x": 5, + "y": 1 + }, + { + "label": "5,0", + "x": 11.25, + "y": 1 + }, + { + "label": "5,1", + "x": 12.25, + "y": 1 + }, + { + "label": "5,2", + "x": 13.25, + "y": 1 + }, + { + "label": "5,3", + "x": 14.25, + "y": 1 + }, + { + "label": "1,0", + "x": 1, + "y": 1.5 + }, + { + "label": "5,4", + "x": 15.25, + "y": 1.5 + }, + { + "label": "2,1", + "x": 2, + "y": 2 + }, + { + "label": "2,2", + "x": 3, + "y": 2 + }, + { + "label": "2,3", + "x": 4, + "y": 2 + }, + { + "label": "2,4", + "x": 5, + "y": 2 + }, + { + "label": "3,5", + "x": 6.5, + "y": 2 + }, + { + "label": "7,4", + "x": 9.75, + "y": 2 + }, + { + "label": "6,0", + "x": 11.25, + "y": 2 + }, + { + "label": "6,1", + "x": 12.25, + "y": 2 + }, + { + "label": "6,2", + "x": 13.25, + "y": 2 + }, + { + "label": "6,3", + "x": 14.25, + "y": 2 + }, + { + "label": "2,0", + "x": 1, + "y": 2.5 + }, + { + "label": "6,4", + "x": 15.25, + "y": 2.5 + }, + { + "label": "3,2", + "x": 4.5, + "y": 3.25 + }, + { + "label": "3,3", + "x": 5.5, + "y": 3.25 + }, + { + "label": "3,4", + "x": 6.5, + "y": 3.25 + }, + { + "label": "7,0", + "x": 9.5, + "y": 3.25 + }, + { + "label": "7,1", + "x": 10.5, + "y": 3.25 + }, + { + "label": "7,2", + "x": 11.5, + "y": 3.25 + }, + { + "label": "3,0", + "x": 5.5, + "y": 4.25 + }, + { + "label": "3,1", + "x": 6.5, + "y": 4.25 + } + ] + } + } +} diff --git a/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/keymaps/vial/config.h b/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/keymaps/vial/config.h new file mode 100644 index 00000000000..9cdd51f92e7 --- /dev/null +++ b/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/keymaps/vial/config.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +#define VIAL_KEYBOARD_UID {0x66, 0x83, 0x08, 0x46, 0xDB, 0x21, 0xDC, 0x9E} + +#define VIAL_UNLOCK_COMBO_ROWS { 0, 3 } +#define VIAL_UNLOCK_COMBO_COLS { 0, 3 } diff --git a/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/keymaps/vial/keymap.c b/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/keymaps/vial/keymap.c new file mode 100644 index 00000000000..120f7354e5b --- /dev/null +++ b/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/keymaps/vial/keymap.c @@ -0,0 +1,287 @@ +#include QMK_KEYBOARD_H +#include "3x5_mini_3_track.h" + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _MOUSE 3 + +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) + +enum wyld_keycodes { + WYLD_AUTO_MS_TOG = SAFE_RANGE +}; + +// TRACKBALL IN WALL LAYOUT (STANDARD 3X5_3) +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_split_3x5_3( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_MUTE, KC_HOME, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + RAISE, KC_SPC, KC_TAB, KC_HOME, KC_ENT, LOWER, + KC_LALT, KC_GRV + ), + + [_LOWER] = LAYOUT_split_3x5_3( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + DPI_RMOD,DPI_MOD,DPI_RST, _______, _______, KC_MUTE, _______, WYLD_AUTO_MS_TOG, KC_MINS, KC_EQL, KC_PIPE, QK_BOOT , + KC_LPRN, KC_RPRN, _______, SNIPING, DRGSCRL, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + _______, KC_BTN1, KC_BTN3, _______, _______, _______, + _______, KC_BTN2 + ), + + [_RAISE] = LAYOUT_split_3x5_3( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + QK_BOOT, S(KC_0), KC_LCBR, KC_RCBR, KC_EQL, KC_HOME, _______, KC_MINS, KC_4, KC_5, KC_6, KC_QUOT, + DPI_RMOD,DPI_MOD, DPI_RST,_______,_______, _______, KC_1, KC_2, KC_3, _______, + _______, _______, _______, _______, _______, _______, + _______, _______ + ), + + [_MOUSE] = LAYOUT_split_3x5_3( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_BTN2, KC_BTN3, KC_BTN1, KC_BTN2, KC_MUTE, _______,_______, KC_BTN1, KC_BTN3, KC_BTN2, _______, + _______, _______, _______, SNIPING, DRGSCRL, _______, _______, _______, _______, _______, + _______, KC_BTN1, KC_BTN3, _______, _______, _______, + _______, KC_BTN2 + ) +}; + +#ifdef POINTING_DEVICE_COMBINED + +static void check_drag(report_mouse_t* mouse_report) { + static int16_t scroll_buffer_x = 0; + static int16_t scroll_buffer_y = 0; + +# ifdef CHARYBDIS_DRAGSCROLL_REVERSE_X + scroll_buffer_x -= mouse_report->x; +# else + scroll_buffer_x += mouse_report->x; +# endif // CHARYBDIS_DRAGSCROLL_REVERSE_X +# ifdef CHARYBDIS_DRAGSCROLL_REVERSE_Y + scroll_buffer_y -= mouse_report->y; +# else + scroll_buffer_y += mouse_report->y; +# endif // CHARYBDIS_DRAGSCROLL_REVERSE_Y + mouse_report->x = 0; + mouse_report->y = 0; + if (abs(scroll_buffer_x) > 6) { + mouse_report->h = scroll_buffer_x > 0 ? 1 : -1; + scroll_buffer_x = 0; + } + if (abs(scroll_buffer_y) > 6) { + mouse_report->v = scroll_buffer_y > 0 ? 1 : -1; + scroll_buffer_y = 0; + } +} + +report_mouse_t pointing_device_task_combined_user(report_mouse_t left_report, report_mouse_t right_report) { + check_drag(&left_report); // updated in trackball.c + return pointing_device_combine_reports(left_report, right_report); +} +#endif + + + + +void pointing_device_init_user(void) { +#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE + set_auto_mouse_enable(true); + set_auto_mouse_enable(false); +#endif +#ifdef POINTING_DEVICE_COMBINED + pointing_device_set_cpi_on_side(true, CHARYBDIS_DRAGSCROLL_DPI); // LEFT + pointing_device_set_cpi_on_side(false, 2000); // RIGHT +#endif// always required before the auto mouse feature will work +} + +#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case WYLD_AUTO_MS_TOG: + if (record->event.pressed) { + set_auto_mouse_enable(!get_auto_mouse_enable()); + } + return false; // Skip all further processing of this key + default: + return true; // Process all other keycodes normally + } +} +#endif + + +#ifdef OLED_ENABLE + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (is_keyboard_left()) { + return OLED_ROTATION_270; + } + return OLED_ROTATION_0; +} + +static const char PROGMEM wylderbuilds[] = { + // 'dark wylderbuilds_oled_name', 128x32 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0xc0, 0x40, + 0x40, 0x60, 0x20, 0x20, 0x30, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x30, 0x20, 0x60, + 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x40, 0x40, 0x60, 0x60, + 0x40, 0x40, 0x40, 0x40, 0xc0, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0xc0, 0x40, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xf0, + 0x00, 0x00, 0xc1, 0xc1, 0x01, 0x01, 0xf1, 0x11, 0x01, 0x01, 0x01, 0x31, 0x60, 0xc0, 0x80, 0xc0, + 0xf0, 0x10, 0x00, 0x00, 0x00, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xc0, + 0x00, 0x01, 0x03, 0x9e, 0xf8, 0x00, 0x00, 0x20, 0xe0, 0xf0, 0x10, 0x30, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x20, 0xf0, 0x30, 0xa0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0x98, 0xf0, 0x70, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0x80, 0x00, 0x70, 0xfe, 0x03, 0x00, 0x00, 0xe0, 0xf0, 0x00, 0x00, + 0x00, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x11, 0xf1, 0x11, 0x33, 0x63, 0xc3, + 0x83, 0x01, 0x01, 0xc1, 0xe1, 0x31, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x1f, 0x7c, 0xff, 0x07, 0x7c, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0x80, 0xc0, 0x40, 0x40, 0x00, 0x00, 0x00, 0x7f, 0xff, + 0x60, 0x30, 0x18, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x01, 0x7f, 0xf2, 0x82, 0x02, 0x80, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x7f, 0x0e, 0x1b, 0x70, 0xc0, 0x00, 0x00, 0x00, 0x01, 0xff, 0x81, 0xc1, 0x63, + 0x3e, 0x00, 0x00, 0x00, 0x1f, 0x7f, 0x40, 0x40, 0x7f, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x00, 0x00, + 0x00, 0x1f, 0xff, 0x80, 0xc0, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xc0, 0x60, 0x30, 0x1f, + 0x07, 0x00, 0x00, 0x01, 0x43, 0x44, 0x7c, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +static void render_wylderbuilds(void) { + oled_write_raw_P(wylderbuilds, sizeof(wylderbuilds)); +} + +bool oled_task_user(void) { + oled_set_cursor(0, 3); + if (is_keyboard_left()) { +// oled_write_P(PSTR("Layer\n"), false); + + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_P(PSTR(" BASE\n"), false); + break; + case _LOWER: + oled_write_P(PSTR("LOWER\n"), false); + break; + case _RAISE: + oled_write_P(PSTR("RAISE\n"), false); + break; + case _MOUSE: + oled_write_P(PSTR("MOUSE\n"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); + } + oled_set_cursor(2, 7); + oled_write_P(PSTR("WPM "), false); + oled_set_cursor(1, 8); + oled_write(get_u8_str(get_current_wpm(), ' '), false); + // Host Keyboard LED Status + + oled_set_cursor(0, 9); + led_t led_state = host_keyboard_led_state(); + + oled_write_P(led_state.num_lock ? PSTR("NUMLK \n") : PSTR(" \n"), false); + oled_write_P(led_state.caps_lock ? PSTR("CAPLK \n") : PSTR(" \n"), false); + oled_write_P(led_state.scroll_lock ? PSTR("SCRLK \n") : PSTR(" \n"), false); + } else { + // write WPM to right OLED + oled_set_cursor(0, 0); + render_wylderbuilds(); + oled_scroll_left(); + } + + return false; +} +#endif + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [_QWERTY] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) }, + [_LOWER] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) }, + [_RAISE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) }, + [_MOUSE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) }, +}; +#endif + +#ifdef RGBLIGHT_ENABLE +const rgblight_segment_t PROGMEM querty_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {12, 3, HSV_RED}, // Light 4 LEDs, starting with LED 6 + {21, 3, HSV_RED} // Light 4 LEDs, starting with LED 6 +); +const rgblight_segment_t PROGMEM lower_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {12, 3, HSV_BLUE}, + {21, 3, HSV_BLUE} +); +const rgblight_segment_t PROGMEM raise_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {12, 3, HSV_YELLOW}, + {21, 3, HSV_YELLOW} +); + +const rgblight_segment_t PROGMEM mouse_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {12, 3, HSV_GREEN}, + {21, 3, HSV_GREEN} +); + +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + querty_layer, // Overrides caps lock layer + lower_layer, // Overrides other layers + raise_layer, // Overrides other layers + mouse_layer // Overrides other layers +); + +//bool led_update_user(led_t led_state) { +// rgblight_set_layer_state(0, led_state.caps_lock); +// return true; +//} + +layer_state_t default_layer_state_set_user(layer_state_t state) { + rgblight_set_layer_state(0, layer_state_cmp(state, _QWERTY)); + return state; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + rgblight_set_layer_state(1, layer_state_cmp(state, _LOWER)); + rgblight_set_layer_state(2, layer_state_cmp(state, _RAISE)); + return state; +} + + +#endif + +// rgblight_enable(); + + +void keyboard_post_init_user(void) { +#ifdef RGBLIGHT_ENABLE + rgblight_layers = my_rgb_layers; +// rgblight_layers = my_rgb_layers; +// rgblight_enable_noeeprom(); // Enables RGB, without saving settings +// rgblight_sethsv_noeeprom_cyan(); +// rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); +#endif + +#ifdef CONSOLE_ENABLE + debug_enable=true; + debug_matrix=true; + debug_keyboard=true; + debug_mouse=true; +#else + debug_enable=false; + debug_matrix=false; + debug_keyboard=false; + debug_mouse=false; +#endif +} + + diff --git a/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/keymaps/vial/rules.mk b/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/keymaps/vial/rules.mk new file mode 100644 index 00000000000..d1c35cfd60d --- /dev/null +++ b/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/keymaps/vial/rules.mk @@ -0,0 +1,9 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes +VIAL_INSECURE = yes +LTO_ENABLE = no +QMK_SETTINGS = yes +TAP_DANCE_ENABLE = yes +COMBO_ENABLE = yes +KEY_OVERRIDE_ENABLE = yes +VIALRGB_ENABLE = yes \ No newline at end of file diff --git a/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/keymaps/vial/vial.json b/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/keymaps/vial/vial.json new file mode 100644 index 00000000000..25f15e0562a --- /dev/null +++ b/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/keymaps/vial/vial.json @@ -0,0 +1,136 @@ +{ + "matrix": { + "rows": 8, + "cols": 6 + }, + "layouts": { + "keymap": [ + { + "name": "Wylderbuilds 3x5 Mini 3 Track" + }, + [ + { + "x": 2 + }, + "0,1", + "0,2", + "0,3", + "0,4", + { + "x": 5.25 + }, + "4,0", + "4,1", + "4,2", + "4,3" + ], + [ + { + "y": -0.5, + "x": 1 + }, + "0,0", + { + "x": 13.25 + }, + "4,4" + ], + [ + { + "y": -0.5, + "x": 2 + }, + "1,1", + "1,2", + "1,3", + "1,4", + "0,0\n\n\n\n\n\n\n\n\ne", + "0,1\n\n\n\n\n\n\n\n\ne", + { + "x": 1.25 + }, + "1,0\n\n\n\n\n\n\n\n\ne", + "1,1\n\n\n\n\n\n\n\n\ne", + "5,0", + "5,1", + "5,2", + "5,3" + ], + [ + { + "y": -0.5, + "x": 1 + }, + "1,0", + { + "x": 13.25 + }, + "5,4" + ], + [ + { + "y": -0.5, + "x": 2 + }, + "2,1", + "2,2", + "2,3", + { + "n": true + }, + "2,4", + { + "x": 0.5 + }, + "3,5", + { + "x": 2.25 + }, + "7,4", + { + "x": 0.5 + }, + "6,0", + { + "n": true + }, + "6,1", + "6,2", + "6,3" + ], + [ + { + "y": -0.5, + "x": 1 + }, + "2,0", + { + "x": 13.25 + }, + "6,4" + ], + [ + { + "y": -0.25, + "x": 4.5 + }, + "3,2", + "3,3", + "3,4", + { + "x": 2 + }, + "7,0", + "7,1", + "7,2" + ], + [ + { + "x": 5.5 + }, + "3,0", + "3,1" + ] + ] + } +} \ No newline at end of file diff --git a/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/mcuconf.h b/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/mcuconf.h new file mode 100644 index 00000000000..1bb29231feb --- /dev/null +++ b/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/mcuconf.h @@ -0,0 +1,18 @@ +// +// Created by nethe on 12/29/2022. +// + +#pragma once + +#include_next "mcuconf.h" + +#undef RP_I2C_USE_I2C0 +#define RP_I2C_USE_I2C0 TRUE + +#undef RP_I2C_USE_I2C1 +#define RP_I2C_USE_I2C1 FALSE + +#ifndef WYLD_QMK_FIRMWARE_MCUCONF_H +#define WYLD_QMK_FIRMWARE_MCUCONF_H + +#endif // WYLD_QMK_FIRMWARE_MCUCONF_H diff --git a/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/rules.mk b/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/rules.mk new file mode 100644 index 00000000000..651ddd6c070 --- /dev/null +++ b/keyboards/handwired/wylderbuilds/trackball/3x5_mini_3_track/rules.mk @@ -0,0 +1,23 @@ +MCU = RP2040 +SPLIT_KEYBOARD = yes +BOOTLOADER = rp2040 +SERIAL_DRIVER = vendor + +MOUSEKEY_ENABLE = yes +CONSOLE_ENABLE = no +#COMMAND_ENABLE = yes +BOOTMAGIC_ENABLE = yes +OLED_ENABLE = yes #OLED_DRIVER = SSD1306 +WPM_ENABLE = yes +EXTRAKEY_ENABLE = yes # Audio control and System control +NKRO_ENABLE = yes # Enable N-Key Rollover +ENCODER_ENABLE = yes +ENCODER_MAP_ENABLE = yes + +RGBLIGHT_ENABLE = no +WS2812_DRIVER = vendor +SLEEP_LED_ENABLE = no + +OPT_DEFS += -DHAL_USE_I2C=TRUE + +#OPT_DEFS += -DHAL_USE_I2C=TRUE \ No newline at end of file diff --git a/keyboards/handwired/wylderbuilds/trackball/4x7_whole_track/keymaps/vial/keymap.c b/keyboards/handwired/wylderbuilds/trackball/4x7_whole_track/keymaps/vial/keymap.c index 762f0782a8f..73c5112f5f6 100644 --- a/keyboards/handwired/wylderbuilds/trackball/4x7_whole_track/keymaps/vial/keymap.c +++ b/keyboards/handwired/wylderbuilds/trackball/4x7_whole_track/keymaps/vial/keymap.c @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6, KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 ,_______, _______,_______,_______,_______,_______,_______,KC_LBRC, KC_RBRC,_______,KC_NUM,KC_INS ,KC_SCRL,KC_MUTE,_______, _______,_______,KC_LEFT,KC_UP,KC_DOWN,KC_RGHT,KC_LPRN, KC_RPRN,KC_BTN1,KC_BTN3,KC_BTN2,_______,KC_VOLU,_______, - QK_BOOT,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,WYLD_AUTO_MS_TOG,KC_VOLD, + QK_BOOT,DPI_RMOD,DPI_MOD,DPI_RST,_______,_______,_______, _______,_______,_______,_______,_______,WYLD_AUTO_MS_TOG,KC_VOLD, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______