diff --git a/.github/workflows/build_firmware.yml b/.github/workflows/build_firmware.yml new file mode 100644 index 0000000..8437e74 --- /dev/null +++ b/.github/workflows/build_firmware.yml @@ -0,0 +1,74 @@ +name: Build kb firmware + +on: + pull_request: + +env: + QMK_REPO: vial-kb/vial-qmk + QMK_BRANCH: vial + +jobs: + get-changes: + name: Detect which configs changed + runs-on: ubuntu-latest + permissions: + pull-requests: read + outputs: + keyboards: ${{steps.filter.outputs.changes}} + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.ref }} + - name: Detect which keyboard had changes + uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + planck/rev7:soryn: + - 'keyboards/planck/rev7/keymaps/soryn/**' + splaytoraid:soryn: + - 'keyboards/splaytoraid/keymaps/soryn/**' + + build: + name: Build firmware for ${{matrix.keyboard}} + needs: get-changes + if: ${{needs.get-changes.outputs.keyboards != '[]' && needs.get-changes.outputs.keyboards != ''}} + strategy: + matrix: + keyboard: ${{ fromJSON(needs.get-changes.outputs.keyboards) }} + permissions: + contents: write + pull-requests: write + runs-on: ubuntu-latest + container: + image: qmkfm/qmk_cli + options: --user 1001 + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.ref }} + - name: Get Vial fork + run: | + git clone https://github.com/$QMK_REPO.git --depth 1 --branch $QMK_BRANCH ./qmk_firmware + - name: Setup QMK + run: | + qmk config user.qmk_home=./qmk_firmware + qmk setup -y + - name: Clone config into QMK repo + run: | + cp -rup ./keyboards/* ./qmk_firmware/keyboards/ + - name: Compile firmware + run: | + cd ./qmk_firmware + make ${{matrix.keyboard}} + - name: Move built firmware to folder + continue-on-error: true + run: | + cp ./qmk_firmware/*.hex ./qmk_firmware/*.bin ./qmk_firmware/*.uf2 ./firmware + - name: Upload firmware to PR + uses: EndBug/add-and-commit@v9 + with: + add: "./firmware" + message: "chore(firmware): Upload newest firmware for ${{matrix.keyboard}}" + pathspec_error_handling: exitAtEnd + default_author: github_actions diff --git a/.github/workflows/firmware_build.yml b/.github/workflows/firmware_build.yml deleted file mode 100644 index df00d2b..0000000 --- a/.github/workflows/firmware_build.yml +++ /dev/null @@ -1,61 +0,0 @@ -on: - workflow_dispatch: - -name: Build firmware - -jobs: - changes: - name: Detect changes to keyboards - runs-on: ubuntu-latest - permissions: - pull-requests: read - outputs: - keyboards: ${{steps.filter.outputs.changes}} - steps: - - uses: actions/checkout@v3 - - name: Detect which keyboard had changes - uses: dorny/paths-filter@v2 - id: filter - with: - filters: | - keyboards/planck/rev7/keymaps/soryn: - - 'keyboards/planck/rev7/keymaps/soryn/**' - - build_firmware: - name: ${{matrix.keyboard}} - needs: changes - if: ${{needs.changes.outputs.keyboards != '[]' && needs.changes.outputs.keyboards != ''}} - strategy: - matrix: - keyboard: ${{ fromJSON(needs.changes.outputs.keyboards) }} - permissions: - contents: write - pull-requests: write - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.ref }} - - name: Split changes keyboard string - uses: xom9ikk/split@v1 - id: split - with: - string: ${{matrix.keyboard}} - separator: / - limit: -1 - - name: Build firmware - uses: Soryyyn/qmk-build@v1.2 - with: - keymap-path: "keyboards/planck/rev7/keymaps/soryn" - keyboard: "${{ steps.split.outputs._1 }}/${{ steps.split.outputs._2}}" - keymap: "${{ steps.split.outputs._4}}" - - name: Move firmware to folder - run: | - cp ./build/*.hex ./build/*.bin ./firmware - - name: Upload firmware to repo - uses: EndBug/add-and-commit@v9 - with: - add: "./firmware" - message: "chore(firmware): Upload newest firmware for ${{matrix.keyboard}}" - pathspec_error_handling: exitAtEnd - default_author: github_actions diff --git a/firmware/splaytoraid_soryn.uf2 b/firmware/splaytoraid_soryn.uf2 new file mode 100644 index 0000000..1c038c0 Binary files /dev/null and b/firmware/splaytoraid_soryn.uf2 differ diff --git a/keyboards/splaytoraid/config.h b/keyboards/splaytoraid/config.h new file mode 100644 index 0000000..7f0b46f --- /dev/null +++ b/keyboards/splaytoraid/config.h @@ -0,0 +1,54 @@ +// Copyright 2024 Conor Burns (@Conor-Burns) +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +#define RGB_ENABLE_PIN 21 +#define DRIVER_LED_TOTAL 36 +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_BREATHING +#define RGB_MATRIX_STARTUP_HUE 152 +#define RGB_MATRIX_STARTUP_SAT 232 +#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS +#define RGB_MATRIX_STARTUP_SPD 50 + +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_MATRIX_KEYPRESSES + +#define ENABLE_RGB_MATRIX_SOLID_COLOR +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +#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 diff --git a/keyboards/splaytoraid/keyboard.json b/keyboards/splaytoraid/keyboard.json new file mode 100644 index 0000000..ef3bbf9 --- /dev/null +++ b/keyboards/splaytoraid/keyboard.json @@ -0,0 +1,141 @@ +{ + "manufacturer": "Freya", + "keyboard_name": "splaytoraid", + "maintainer": "freya-irl", + "url": "https://github.com/freya-irl/splaytoraid40", + "processor": "RP2040", + "bootloader": "rp2040", + "diode_direction": "COL2ROW", + "matrix_pins": { + "cols": ["GP2", "GP3", "GP4", "GP5", "GP6", "GP23", "GP20", "GP22", "GP26", "GP27"], + "rows": ["GP0", "GP29", "GP1", "GP28", "GP7", "GP9"] + }, + "usb": { + "device_version": "4.0.0", + "pid": "0xCB00", + "vid": "0x2004" + }, + "features": { + "bootmagic": true, + "console": true, + "dip_switch": true, + "encoder_map": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true + }, + "dip_switch": { + "enabled": true, + "pins": ["GP14"] + }, + "qmk": { + "locking": { + "enabled": true, + "resync": true + } + }, + "bootmagic": { + "matrix": [5, 0] + }, + "encoder": { + "enabled": true, + "rotary": [ + {"pin_a": "GP12", "pin_b": "GP13", "resolution": 4} + ] + }, + "ws2812": { + "driver": "vendor", + "pin": "GP25" + }, + "rgb_matrix": { + "driver": "ws2812", + "layout": [ + { "flags": 2, "x":17, "y": 0 }, + { "flags": 2, "x": 0, "y": 8 }, + { "flags": 2, "x": 0, "y": 19 }, + { "flags": 2, "x": 9, "y": 23 }, + { "flags": 2, "x": 13, "y": 30 }, + { "flags": 2, "x": 22, "y": 30 }, + { "flags": 2, "x": 30, "y": 26 }, + { "flags": 2, "x": 39, "y": 26 }, + { "flags": 2, "x": 47, "y": 30 }, + { "flags": 2, "x": 47, "y": 38 }, + { "flags": 2, "x": 47, "y": 45 }, + { "flags": 2, "x": 56, "y": 49 }, + { "flags": 2, "x": 65, "y": 53 }, + { "flags": 2, "x": 69, "y": 53 }, + { "flags": 2, "x": 78, "y": 56 }, + { "flags": 2, "x": 86, "y": 64 }, + { "flags": 2, "x": 95, "y": 60 }, + { "flags": 2, "x": 99, "y": 53 }, + { "flags": 2, "x": 125, "y": 53 }, + { "flags": 2, "x": 129, "y": 60 }, + { "flags": 2, "x": 138, "y": 64 }, + { "flags": 2, "x": 146, "y": 56 }, + { "flags": 2, "x": 155, "y": 53 }, + { "flags": 2, "x": 159, "y": 53 }, + { "flags": 2, "x": 168, "y": 49 }, + { "flags": 2, "x": 177, "y": 45 }, + { "flags": 2, "x": 177, "y": 38 }, + { "flags": 2, "x": 177, "y": 30 }, + { "flags": 2, "x": 185, "y": 26 }, + { "flags": 2, "x": 194, "y": 26 }, + { "flags": 2, "x": 202, "y": 30 }, + { "flags": 2, "x": 211, "y": 30 }, + { "flags": 2, "x": 215, "y": 23 }, + { "flags": 2, "x": 224, "y": 19 }, + { "flags": 2, "x": 224, "y": 8 }, + { "flags": 2, "x": 207, "y": 0 } + ] + }, + "layouts": { + "LAYOUT_40": { + "layout": [ + {"label": "K00", "matrix": [0, 0], "x": 1, "y": 0}, + {"label": "K01", "matrix": [0, 1], "x": 2, "y": 0}, + {"label": "K02", "matrix": [0, 2], "x": 3, "y": 0}, + {"label": "K03", "matrix": [0, 3], "x": 4, "y": 0}, + {"label": "K04", "matrix": [0, 4], "x": 5, "y": 0}, + {"label": "K05", "matrix": [1, 5], "x": 6, "y": 0}, + {"label": "K06", "matrix": [1, 6], "x": 7, "y": 0}, + {"label": "K07", "matrix": [1, 7], "x": 8, "y": 0}, + {"label": "K08", "matrix": [1, 8], "x": 9, "y": 0}, + {"label": "K09", "matrix": [1, 9], "x": 10, "y": 0}, + + {"label": "K30", "matrix": [5, 0], "x": 0, "y": 1}, + {"label": "K10", "matrix": [2, 0], "x": 1, "y": 1}, + {"label": "K11", "matrix": [2, 1], "x": 2, "y": 1}, + {"label": "K12", "matrix": [2, 2], "x": 3, "y": 1}, + {"label": "K13", "matrix": [2, 3], "x": 4, "y": 1}, + {"label": "K14", "matrix": [2, 4], "x": 5, "y": 1}, + {"label": "K15", "matrix": [3, 5], "x": 6, "y": 1}, + {"label": "K16", "matrix": [3, 6], "x": 7, "y": 1}, + {"label": "K17", "matrix": [3, 7], "x": 8, "y": 1}, + {"label": "K18", "matrix": [3, 8], "x": 9, "y": 1}, + {"label": "K19", "matrix": [3, 9], "x": 11, "y": 1}, + {"label": "K39", "matrix": [5, 9], "x": 12, "y": 1}, + + {"label": "K31", "matrix": [5, 1], "x": 0, "y": 2}, + {"label": "K20", "matrix": [4, 0], "x": 1, "y": 2}, + {"label": "K21", "matrix": [4, 1], "x": 2, "y": 2}, + {"label": "K22", "matrix": [4, 2], "x": 3, "y": 2}, + {"label": "K23", "matrix": [4, 3], "x": 4, "y": 2}, + {"label": "K24", "matrix": [4, 4], "x": 5, "y": 2}, + {"label": "K25", "matrix": [4, 5], "x": 6, "y": 2}, + {"label": "K26", "matrix": [4, 6], "x": 7, "y": 2}, + {"label": "K27", "matrix": [4, 7], "x": 8, "y": 2}, + {"label": "K28", "matrix": [4, 8], "x": 9, "y": 2}, + {"label": "K29", "matrix": [4, 9], "x": 10, "y": 2}, + {"label": "K38", "matrix": [5, 8], "x": 11, "y": 2}, + + {"label": "K32", "matrix": [5, 2], "x": 3, "y": 3}, + {"label": "K33", "matrix": [5, 3], "x": 4, "y": 3}, + {"label": "K34", "matrix": [5, 4], "x": 5, "y": 3}, + {"label": "K35", "matrix": [5, 5], "x": 6, "y": 3}, + {"label": "K36", "matrix": [5, 6], "x": 7, "y": 3}, + {"label": "K37", "matrix": [5, 7], "x": 8, "y": 3} + ] + } + } +} diff --git a/keyboards/splaytoraid/keymaps/default/keymap.c b/keyboards/splaytoraid/keymaps/default/keymap.c new file mode 100644 index 0000000..b0a4dfe --- /dev/null +++ b/keyboards/splaytoraid/keymaps/default/keymap.c @@ -0,0 +1,58 @@ +// Copyright 2024 Conor Burns (@Conor-Burns) +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _LOWER, + _RAISE, + _ADJUST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_40( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + 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_TAB, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSPC, + KC_LSFT, KC_ESC, KC_ENT, KC_SPC, KC_DEL, KC_RSFT + ), + + [_LOWER] = LAYOUT_40( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT_40( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT_40( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ) +}; + + +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_LOWER] = { ENCODER_CCW_CW(KC_MPRV, KC_MNXT) }, + [_RAISE] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }, + [_ADJUST] = { ENCODER_CCW_CW(KC_RGHT, KC_LEFT) } +}; + +bool dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: + if(active) { tap_code(KC_MPLY); } else { } + break; + } + return true; +} diff --git a/keyboards/splaytoraid/keymaps/soryn/config.h b/keyboards/splaytoraid/keymaps/soryn/config.h new file mode 100644 index 0000000..faaae5d --- /dev/null +++ b/keyboards/splaytoraid/keymaps/soryn/config.h @@ -0,0 +1,20 @@ +// Copyright 2024 Conor Burns (@Conor-Burns) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#define VIAL_KEYBOARD_UID {0xCB, 0x00, 0x04, 0x00, 0x20, 0x04, 0xCA, 0xFE} +#define VIAL_UNLOCK_COMBO_ROWS { 5, 5 } +#define VIAL_UNLOCK_COMBO_COLS { 0, 9 } + +// Able to create 16 layers. +#define DYNAMIC_KEYMAP_LAYER_COUNT 16 + +// Configure the global tapping term (default: 200ms) +#define TAPPING_TERM 180 + +// Turn of the backlight once the PC goes into sleep. +#define RGBLIGHT_SLEEP true + +#define RETRO_TAPPING true + +#define FORCE_NKRO true diff --git a/keyboards/splaytoraid/keymaps/soryn/keymap.c b/keyboards/splaytoraid/keymaps/soryn/keymap.c new file mode 100644 index 0000000..d0e21b5 --- /dev/null +++ b/keyboards/splaytoraid/keymaps/soryn/keymap.c @@ -0,0 +1,86 @@ +// Copyright 2024 Conor Burns (@Conor-Burns) +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _NAVIGATION, + _SYMBOLS, + _NUMBERS, + _FUNCTIONS +}; + +// Homerow mods +// Left side +#define GUI_A LGUI_T(KC_A) +#define ALT_S LALT_T(KC_S) +#define CTL_D LCTL_T(KC_D) +#define SFT_F LSFT_T(KC_F) +// Right side +#define GUI_SCLN RGUI_T(KC_SCLN) +#define ALT_L LALT_T(KC_L) +#define CTL_K RCTL_T(KC_K) +#define SFT_J RSFT_T(KC_J) + +// Layer triggers +#define TAB_NAV LT(_NAVIGATION, KC_TAB) +#define ENT_SYM LT(_SYMBOLS, KC_ENT) +#define BSP_NUM LT(_NUMBERS, KC_BSPC) +#define DEL_FUN LT(_FUNCTIONS, KC_DEL) +#define TAB_NAV LT(_NAVIGATION, KC_TAB) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_40( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_ESC, GUI_A, ALT_S, CTL_D, SFT_F, KC_G, KC_H, SFT_J, CTL_K, ALT_L, GUI_SCLN, KC_BSLS, + KC_CAPS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, + KC_RALT, TAB_NAV, KC_SPC, ENT_SYM, BSP_NUM, DEL_FUN + ), + + [_NAVIGATION] = LAYOUT_40( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDO, KC_PSTE, KC_COPY, KC_CUT, S(KC_UNDO), + XXXXXXX, KC_LGUI, KC_LALT, KC_LSFT, KC_LCTL, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, KC_ENT, KC_BSPC, KC_DEL + ), + + [_SYMBOLS] = LAYOUT_40( + S(KC_LBRC), S(KC_7), S(KC_8), S(KC_9), S(KC_RBRC), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, S(KC_SCLN), S(KC_4), S(KC_5), S(KC_6), S(KC_EQL), XXXXXXX, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, + XXXXXXX, S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_BSLS), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LPRN, KC_RPRN, S(KC_MINS), XXXXXXX, XXXXXXX, XXXXXXX + ), + + [_NUMBERS] = LAYOUT_40( + KC_LBRC, KC_7, KC_8, KC_9, KC_RBRC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_SCLN, KC_4, KC_5, KC_6, KC_EQL, XXXXXXX, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, + XXXXXXX, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_DOT, KC_0, KC_MINS, XXXXXXX, XXXXXXX, XXXXXXX + ), + + [_FUNCTIONS] = LAYOUT_40( + KC_F12, KC_F7, KC_F8, KC_F9, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_F11, KC_F4, KC_F5, KC_F6, XXXXXXX, XXXXXXX, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, + XXXXXXX, KC_F10, KC_F1, KC_F2, KC_F3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_APP, KC_TAB, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX + ) +}; + + +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_NAVIGATION] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_SYMBOLS] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_NUMBERS] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_FUNCTIONS] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) } +}; + +bool dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: + if(active) { tap_code(KC_MPLY); } else { } + break; + } + return true; +} diff --git a/keyboards/splaytoraid/keymaps/soryn/rules.mk b/keyboards/splaytoraid/keymaps/soryn/rules.mk new file mode 100644 index 0000000..a044f85 --- /dev/null +++ b/keyboards/splaytoraid/keymaps/soryn/rules.mk @@ -0,0 +1,6 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes +VIALRGB_ENABLE = yes +NKRO_ENABLE = yes +FORCE_NKRO = yes +MOUSEKEY_ENABLE = yes diff --git a/keyboards/splaytoraid/keymaps/soryn/vial.json b/keyboards/splaytoraid/keymaps/soryn/vial.json new file mode 100644 index 0000000..bca0c96 --- /dev/null +++ b/keyboards/splaytoraid/keymaps/soryn/vial.json @@ -0,0 +1,314 @@ +{ + "name":"splaytoraid", + "vendorId":"0xCB00", + "productId":"0x2004", + "lighting": "vialrgb", + "matrix":{ + "rows":6, + "cols":10 + }, + "layouts":{ + "keymap":[ + [ + { + "y":2.75, + "x":6.35 + }, + "0,0\n\n\n\n\n\n\n\n\ne", + "0,1\n\n\n\n\n\n\n\n\ne" + ], + [ + { + "r":7, + "rx":4.55, + "y":0.8, + "x":-3 + }, + "0,0" + ], + [ + { + "y":-0.5, + "x":-4 + }, + "5,0" + ], + [ + { + "y":-0.4999999999999998, + "x":-3 + }, + "2,0" + ], + [ + { + "y":-0.5, + "x":-4 + }, + "5,1" + ], + [ + { + "y":-0.5, + "x":-3 + }, + "4,0" + ], + [ + { + "r":11, + "y":-3.55, + "x":-1.75 + }, + "0,1" + ], + [ + { + "x":-1.75 + }, + "2,1" + ], + [ + { + "x":-1.75 + }, + "4,1" + ], + [ + { + "r":15, + "y":-3.25, + "x":-0.5499999999999998 + }, + "0,2" + ], + [ + { + "y":-0.75, + "x":0.4500000000000002 + }, + "0,3" + ], + [ + { + "y":-0.75, + "x":1.4500000000000002 + }, + "0,4" + ], + [ + { + "y":-0.5, + "x":-0.5499999999999998 + }, + "2,2" + ], + [ + { + "y":-0.75, + "x":0.4500000000000002 + }, + "2,3" + ], + [ + { + "y":-0.75, + "x":1.4500000000000002 + }, + "2,4" + ], + [ + { + "y":-0.5, + "x":-0.5499999999999998 + }, + "4,2" + ], + [ + { + "y":-0.75, + "x":0.4500000000000002 + }, + "4,3" + ], + [ + { + "y":-0.75, + "x":1.4500000000000002 + }, + "4,4" + ], + [ + { + "r":18, + "y":-0.10000000000000009, + "x":0.35000000000000053 + }, + "5,2" + ], + [ + { + "r":27, + "y":-1.2500000000000004, + "x":2 + }, + "5,3" + ], + [ + { + "r":35, + "y":-1.9500000000000002, + "x":3.55, + "h":1.5 + }, + "5,4" + ], + [ + { + "r":-35, + "rx":10.3, + "y":2.15, + "x":-4.700000000000001, + "h":1.5 + }, + "5,5" + ], + [ + { + "r":-27, + "y":-0.04999999999999982, + "x":-3.1500000000000004 + }, + "5,6" + ], + [ + { + "r":-18, + "y":-0.6999999999999997, + "x":-1.5 + }, + "5,7" + ], + [ + { + "r":-15, + "y":-4.4, + "x":-0.6000000000000014 + }, + "1,7" + ], + [ + { + "y":-0.75, + "x":-1.6000000000000014 + }, + "1,6" + ], + [ + { + "y":-0.75, + "x":-2.6000000000000005 + }, + "1,5" + ], + [ + { + "y":-0.5, + "x":-0.6000000000000014 + }, + "3,7" + ], + [ + { + "y":-0.75, + "x":-1.6000000000000014 + }, + "3,6" + ], + [ + { + "y":-0.75, + "x":-2.6000000000000005 + }, + "3,5" + ], + [ + { + "y":-0.5, + "x":-0.6000000000000014 + }, + "4,7" + ], + [ + { + "y":-0.75, + "x":-1.6000000000000014 + }, + "4,6" + ], + [ + { + "y":-0.75, + "x":-2.6000000000000005 + }, + "4,5" + ], + [ + { + "r":-12, + "y":-3.25, + "x":0.5499999999999989 + }, + "1,8" + ], + [ + { + "x":0.5499999999999989 + }, + "3,8" + ], + [ + { + "x":0.5499999999999989 + }, + "4,8" + ], + [ + { + "r":-8, + "y":-2.45, + "x":1.799999999999999 + }, + "1,9" + ], + [ + { + "y":-0.4999999999999998, + "x":2.799999999999999 + }, + "5,9" + ], + [ + { + "y":-0.4999999999999998, + "x":1.799999999999999 + }, + "3,9" + ], + [ + { + "y":-0.5, + "x":2.799999999999999 + }, + "5,8" + ], + [ + { + "y":-0.5, + "x":1.799999999999999 + }, + "4,9" + ] + ] + } + } diff --git a/keyboards/splaytoraid/keymaps/vial/config.h b/keyboards/splaytoraid/keymaps/vial/config.h new file mode 100644 index 0000000..8619b47 --- /dev/null +++ b/keyboards/splaytoraid/keymaps/vial/config.h @@ -0,0 +1,7 @@ +// Copyright 2024 Conor Burns (@Conor-Burns) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#define VIAL_KEYBOARD_UID {0xCB, 0x00, 0x04, 0x00, 0x20, 0x04, 0xCA, 0xFE} +#define VIAL_UNLOCK_COMBO_ROWS { 5, 5 } +#define VIAL_UNLOCK_COMBO_COLS { 0, 9 } diff --git a/keyboards/splaytoraid/keymaps/vial/keymap.c b/keyboards/splaytoraid/keymaps/vial/keymap.c new file mode 100644 index 0000000..b0a4dfe --- /dev/null +++ b/keyboards/splaytoraid/keymaps/vial/keymap.c @@ -0,0 +1,58 @@ +// Copyright 2024 Conor Burns (@Conor-Burns) +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _LOWER, + _RAISE, + _ADJUST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_40( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + 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_TAB, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSPC, + KC_LSFT, KC_ESC, KC_ENT, KC_SPC, KC_DEL, KC_RSFT + ), + + [_LOWER] = LAYOUT_40( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT_40( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT_40( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ) +}; + + +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_LOWER] = { ENCODER_CCW_CW(KC_MPRV, KC_MNXT) }, + [_RAISE] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }, + [_ADJUST] = { ENCODER_CCW_CW(KC_RGHT, KC_LEFT) } +}; + +bool dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: + if(active) { tap_code(KC_MPLY); } else { } + break; + } + return true; +} diff --git a/keyboards/splaytoraid/keymaps/vial/rules.mk b/keyboards/splaytoraid/keymaps/vial/rules.mk new file mode 100644 index 0000000..bbcc42f --- /dev/null +++ b/keyboards/splaytoraid/keymaps/vial/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes +VIALRGB_ENABLE = yes diff --git a/keyboards/splaytoraid/keymaps/vial/vial.json b/keyboards/splaytoraid/keymaps/vial/vial.json new file mode 100644 index 0000000..bca0c96 --- /dev/null +++ b/keyboards/splaytoraid/keymaps/vial/vial.json @@ -0,0 +1,314 @@ +{ + "name":"splaytoraid", + "vendorId":"0xCB00", + "productId":"0x2004", + "lighting": "vialrgb", + "matrix":{ + "rows":6, + "cols":10 + }, + "layouts":{ + "keymap":[ + [ + { + "y":2.75, + "x":6.35 + }, + "0,0\n\n\n\n\n\n\n\n\ne", + "0,1\n\n\n\n\n\n\n\n\ne" + ], + [ + { + "r":7, + "rx":4.55, + "y":0.8, + "x":-3 + }, + "0,0" + ], + [ + { + "y":-0.5, + "x":-4 + }, + "5,0" + ], + [ + { + "y":-0.4999999999999998, + "x":-3 + }, + "2,0" + ], + [ + { + "y":-0.5, + "x":-4 + }, + "5,1" + ], + [ + { + "y":-0.5, + "x":-3 + }, + "4,0" + ], + [ + { + "r":11, + "y":-3.55, + "x":-1.75 + }, + "0,1" + ], + [ + { + "x":-1.75 + }, + "2,1" + ], + [ + { + "x":-1.75 + }, + "4,1" + ], + [ + { + "r":15, + "y":-3.25, + "x":-0.5499999999999998 + }, + "0,2" + ], + [ + { + "y":-0.75, + "x":0.4500000000000002 + }, + "0,3" + ], + [ + { + "y":-0.75, + "x":1.4500000000000002 + }, + "0,4" + ], + [ + { + "y":-0.5, + "x":-0.5499999999999998 + }, + "2,2" + ], + [ + { + "y":-0.75, + "x":0.4500000000000002 + }, + "2,3" + ], + [ + { + "y":-0.75, + "x":1.4500000000000002 + }, + "2,4" + ], + [ + { + "y":-0.5, + "x":-0.5499999999999998 + }, + "4,2" + ], + [ + { + "y":-0.75, + "x":0.4500000000000002 + }, + "4,3" + ], + [ + { + "y":-0.75, + "x":1.4500000000000002 + }, + "4,4" + ], + [ + { + "r":18, + "y":-0.10000000000000009, + "x":0.35000000000000053 + }, + "5,2" + ], + [ + { + "r":27, + "y":-1.2500000000000004, + "x":2 + }, + "5,3" + ], + [ + { + "r":35, + "y":-1.9500000000000002, + "x":3.55, + "h":1.5 + }, + "5,4" + ], + [ + { + "r":-35, + "rx":10.3, + "y":2.15, + "x":-4.700000000000001, + "h":1.5 + }, + "5,5" + ], + [ + { + "r":-27, + "y":-0.04999999999999982, + "x":-3.1500000000000004 + }, + "5,6" + ], + [ + { + "r":-18, + "y":-0.6999999999999997, + "x":-1.5 + }, + "5,7" + ], + [ + { + "r":-15, + "y":-4.4, + "x":-0.6000000000000014 + }, + "1,7" + ], + [ + { + "y":-0.75, + "x":-1.6000000000000014 + }, + "1,6" + ], + [ + { + "y":-0.75, + "x":-2.6000000000000005 + }, + "1,5" + ], + [ + { + "y":-0.5, + "x":-0.6000000000000014 + }, + "3,7" + ], + [ + { + "y":-0.75, + "x":-1.6000000000000014 + }, + "3,6" + ], + [ + { + "y":-0.75, + "x":-2.6000000000000005 + }, + "3,5" + ], + [ + { + "y":-0.5, + "x":-0.6000000000000014 + }, + "4,7" + ], + [ + { + "y":-0.75, + "x":-1.6000000000000014 + }, + "4,6" + ], + [ + { + "y":-0.75, + "x":-2.6000000000000005 + }, + "4,5" + ], + [ + { + "r":-12, + "y":-3.25, + "x":0.5499999999999989 + }, + "1,8" + ], + [ + { + "x":0.5499999999999989 + }, + "3,8" + ], + [ + { + "x":0.5499999999999989 + }, + "4,8" + ], + [ + { + "r":-8, + "y":-2.45, + "x":1.799999999999999 + }, + "1,9" + ], + [ + { + "y":-0.4999999999999998, + "x":2.799999999999999 + }, + "5,9" + ], + [ + { + "y":-0.4999999999999998, + "x":1.799999999999999 + }, + "3,9" + ], + [ + { + "y":-0.5, + "x":2.799999999999999 + }, + "5,8" + ], + [ + { + "y":-0.5, + "x":1.799999999999999 + }, + "4,9" + ] + ] + } + } diff --git a/keyboards/splaytoraid/readme.md b/keyboards/splaytoraid/readme.md new file mode 100644 index 0000000..ed2daa7 --- /dev/null +++ b/keyboards/splaytoraid/readme.md @@ -0,0 +1,23 @@ +# splaytoraid + +A 40% ergonomic keyboard with a stacked case and aRGB underglow. + +* Keyboard Maintainer: [freya](https://github.com/freya-irl) +* Hardware Availability: [here](https://keeb.supply/products/splaytoraid-messenger-edition) + +Make example for this keyboard (after setting up your build environment): + + make 0xcb/splaytoraid:default + +Flashing example for this keyboard: + + make 0xcb/splaytoraid: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: + +* **Physical reset button**: Press the button on the controller (Helios) for more than 500ms diff --git a/keyboards/splaytoraid/splaytoraid.c b/keyboards/splaytoraid/splaytoraid.c new file mode 100644 index 0000000..9c2dd92 --- /dev/null +++ b/keyboards/splaytoraid/splaytoraid.c @@ -0,0 +1,19 @@ +// Copyright 2024 Conor Burns (@Conor-Burns) +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include QMK_KEYBOARD_H + +uint32_t startup_time = 0; + +void keyboard_post_init_kb(void) { + // Enable RGB current limiter and wait for a bit before allowing RGB to continue + setPinOutput(RGB_ENABLE_PIN); + writePinHigh(RGB_ENABLE_PIN); + wait_ms(20); + + // Record the current time + startup_time = timer_read32(); + + // Offload to the user func + keyboard_post_init_user(); +}