Skip to content

Commit

Permalink
Add VIAL port for Keycapsss 3w6 RP2040 (qmk#366)
Browse files Browse the repository at this point in the history
* Add VIAL port for Keycapsss 3w6 RP2040

* fix code format for uid

* fix EE-Hands and move more config options to json

* Fix: add missing split pointing device setting

---------

Co-authored-by: Ben Roe <ben@MacBook-Pro-von-Ben.local>
Co-authored-by: Conor Burns <mail@conor-burns.com>
  • Loading branch information
3 people authored Feb 16, 2023
1 parent 8034427 commit 39713d9
Show file tree
Hide file tree
Showing 8 changed files with 483 additions and 0 deletions.
27 changes: 27 additions & 0 deletions keyboards/keycapsss/3w6_2040/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright 2022 Conor Burns (@Conor-Burns)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once

#include "config_common.h"

#define SERIAL_USART_FULL_DUPLEX // Enable full duplex operation mode.
#define SERIAL_USART_TX_PIN GP0 // USART TX pin
#define SERIAL_USART_RX_PIN GP1 // USART RX pin
#define SERIAL_USART_PIN_SWAP // Swap TX and RX pins if keyboard is master halve.
#define SERIAL_USART_SPEED 921600 // Sped :)
#define USB_VBUS_PIN GP19 // for rp2040 | When USB_VBUS_PIN is not defined, SPLIT_USB_DETECT is used.
#define EE_HANDS // Split handedness via eeprom
#define SPLIT_LED_STATE_ENABLE // Sync host leds (caps lock, ...)
#define SPLIT_LAYER_STATE_ENABLE // Enables syncing of the layer state between both halves
#define SPLIT_POINTING_ENABLE // Transmitting the pointing device status to the master side
#define POINTING_DEVICE_RIGHT // Pointing device on the right side (Required - pick one only)
//#define POINTING_DEVICE_LEFT // Pointing device on the left side (Required - pick one only)

#define RGBLIGHT_DEFAULT_MODE RGBLIGHT_EFFECT_BREATHING + 2
#define RGBLIGHT_DEFAULT_HUE 152
#define RGBLIGHT_DEFAULT_SAT 232
#define RGBLIGHT_DEFAULT_VAR 255
#define RGBLIGHT_DEFAULT_SPD 2

#define BOOTMAGIC_LITE_ROW 0
#define BOOTMAGIC_LITE_COLUMN 0
106 changes: 106 additions & 0 deletions keyboards/keycapsss/3w6_2040/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
"manufacturer": "Keycapsss",
"keyboard_name": "3w6 RP2040",
"maintainer": "Keycapsss",
"url": "https://keycapsss.com",
"processor": "RP2040",
"bootloader": "rp2040",
"bootloader_instructions": "Press and hold the boot button while plugging in the keyboard",
"usb": {
"vid": "0x7983",
"pid": "0x3357",
"device_version": "1.0.0"
},
"features": {
"bootmagic": true,
"command": false,
"console": true,
"extrakey": true,
"mousekey": true,
"pointing_device": true,
"nkro": true,
"rgblight": true
},
"debounce": 5,
"indicators": {
"caps_lock": "GP17"
},
"rgblight": {
"animations": {
"alternating": true,
"breathing": true,
"christmas": true,
"knight": true,
"rainbow_mood": true,
"rainbow_swirl": true,
"rgb_test": true,
"snake": true,
"static_gradient": true,
"twinkle": true
},
"brightness_steps": 8,
"hue_steps": 8,
"led_count": 2,
"max_brightness": 100,
"pin": "GP25",
"saturation_steps": 8,
"split_count": [1, 1]
},
"diode_direction": "COL2ROW",
"matrix_pins": {
"cols": ["GP8", "GP9", "GP10", "GP11", "GP12"],
"rows": ["GP4", "GP5", "GP6", "GP7"]
},
"matrix_size": {
"cols": 5,
"rows": 8
},
"split": {
"enabled": true,
"transport": {
"protocol": "serial"
}
},
"layouts": {
"LAYOUT_split_3x5_3": {
"layout": [
{ "label": "L00", "matrix": [0, 0], "x": 0, "y": 0.75 },
{ "label": "L01", "matrix": [0, 1], "x": 1, "y": 0.25 },
{ "label": "L02", "matrix": [0, 2], "x": 2, "y": 0 },
{ "label": "L03", "matrix": [0, 3], "x": 3, "y": 0.25 },
{ "label": "L04", "matrix": [0, 4], "x": 4, "y": 0.5 },
{ "label": "R04", "matrix": [4, 4], "x": 8.75, "y": 0.5 },
{ "label": "R03", "matrix": [4, 3], "x": 9.75, "y": 0.25 },
{ "label": "R02", "matrix": [4, 2], "x": 10.75, "y": 0 },
{ "label": "R01", "matrix": [4, 1], "x": 11.75, "y": 0.25 },
{ "label": "R00", "matrix": [4, 0], "x": 12.75, "y": 0.75 },
{ "label": "L10", "matrix": [1, 0], "x": 0, "y": 1.75 },
{ "label": "L11", "matrix": [1, 1], "x": 1, "y": 1.25 },
{ "label": "L12", "matrix": [1, 2], "x": 2, "y": 1 },
{ "label": "L13", "matrix": [1, 3], "x": 3, "y": 1.25 },
{ "label": "L14", "matrix": [1, 4], "x": 4, "y": 1.5 },
{ "label": "R14", "matrix": [5, 4], "x": 8.75, "y": 1.5 },
{ "label": "R13", "matrix": [5, 3], "x": 9.75, "y": 1.25 },
{ "label": "R12", "matrix": [5, 2], "x": 10.75, "y": 1 },
{ "label": "R11", "matrix": [5, 1], "x": 11.75, "y": 1.25 },
{ "label": "R10", "matrix": [5, 0], "x": 12.75, "y": 1.75 },
{ "label": "L20", "matrix": [2, 0], "x": 0, "y": 2.75 },
{ "label": "L21", "matrix": [2, 1], "x": 1, "y": 2.25 },
{ "label": "L22", "matrix": [2, 2], "x": 2, "y": 2 },
{ "label": "L23", "matrix": [2, 3], "x": 3, "y": 2.25 },
{ "label": "L24", "matrix": [2, 4], "x": 4, "y": 2.5 },
{ "label": "R24", "matrix": [6, 4], "x": 8.75, "y": 2.5 },
{ "label": "R23", "matrix": [6, 3], "x": 9.75, "y": 2.25 },
{ "label": "R22", "matrix": [6, 2], "x": 10.75, "y": 2 },
{ "label": "R21", "matrix": [6, 1], "x": 11.75, "y": 2.25 },
{ "label": "R20", "matrix": [6, 0], "x": 12.75, "y": 2.75 },
{ "label": "L32", "matrix": [3, 2], "x": 2.75, "y": 3.5 },
{ "label": "L33", "matrix": [3, 3], "x": 4, "y": 3.75 },
{ "label": "L34", "matrix": [3, 4], "x": 5.25, "y": 3.5, "h":1.5 },
{ "label": "R34", "matrix": [7, 4], "x": 7.5, "y": 3.5, "h":1.5 },
{ "label": "R33", "matrix": [7, 3], "x": 8.75, "y": 3.75 },
{ "label": "R32", "matrix": [7, 2], "x": 10, "y": 3.5 }
]
}
}
}
56 changes: 56 additions & 0 deletions keyboards/keycapsss/3w6_2040/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// Copyright 2021 weteor | 2022 Conor Burns (@Conor-Burns)
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H
enum layers {
_ALPHA_QWERTY = 0,
_ALPHA_COLEMAK,
_SYM,
_NAV,
_NUM,
_CFG,
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

// clang-format off

[_ALPHA_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_H, KC_J, KC_K, KC_L, KC_SCLN,
LSFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH),

LCTL_T(KC_ESC), LT(_NUM,KC_SPC), LT(_NAV, KC_TAB), LT(_SYM, KC_BSPC), KC_ENT, LALT_T(KC_DEL)
),
[_ALPHA_COLEMAK] = LAYOUT_split_3x5_3(
KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT,
KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O,
LSFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SCLN),
LCTL_T(KC_ENT), LT(_NUM,KC_SPC), LT(_NAV, KC_TAB), LT(_SYM, KC_BSPC), KC_ENT, LALT_T(KC_DEL)
),
[_SYM] = LAYOUT_split_3x5_3(
KC_GRV , KC_CIRC, KC_AT, KC_DLR, KC_TILD, KC_AMPR, KC_EXLM, KC_PIPE, KC_UNDS, KC_HASH,
KC_SLSH, KC_LBRC, KC_LCBR, KC_LPRN, KC_EQL, KC_ASTR, KC_RPRN, KC_RCBR, KC_RBRC, KC_BSLS,
_______, KC_QUES, KC_PLUS, KC_PERC, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, XXXXXXX, _______,
XXXXXXX, MO(_CFG), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
),
[_NAV] = LAYOUT_split_3x5_3(
XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, KC_PGDN, KC_UP, KC_PGUP, KC_DEL,
KC_MPRV, KC_MPLY, KC_MSTP, KC_MNXT, XXXXXXX, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MO(_CFG), XXXXXXX
),
[_NUM] = LAYOUT_split_3x5_3(
XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, KC_PPLS, KC_P7, KC_P8, KC_P9, KC_PSLS,
XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_P0, KC_P4, KC_P5, KC_P6, KC_PDOT,
XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_PMNS, KC_P1, KC_P2, KC_P3, KC_PAST,
XXXXXXX, XXXXXXX, XXXXXXX, KC_PEQL, KC_PENT, XXXXXXX
),
[_CFG] = LAYOUT_split_3x5_3(
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,DF(_ALPHA_QWERTY), DF(_ALPHA_COLEMAK),
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
),
// clang-format on
};
7 changes: 7 additions & 0 deletions keyboards/keycapsss/3w6_2040/keymaps/vial/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Copyright 2022 Conor Burns (@Conor-Burns)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once

#define VIAL_KEYBOARD_UID {0x5C, 0xD1, 0x02, 0x5A, 0x42, 0x02, 0x9E, 0x28}
#define VIAL_UNLOCK_COMBO_ROWS { 0, 4 }
#define VIAL_UNLOCK_COMBO_COLS { 0, 0 }
56 changes: 56 additions & 0 deletions keyboards/keycapsss/3w6_2040/keymaps/vial/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// Copyright 2021 weteor | 2022 Conor Burns (@Conor-Burns)
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H
enum layers {
_ALPHA_QWERTY = 0,
_ALPHA_COLEMAK,
_SYM,
_NAV,
_NUM,
_CFG,
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

// clang-format off

[_ALPHA_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_H, KC_J, KC_K, KC_L, KC_SCLN,
LSFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH),

LCTL_T(KC_ESC), LT(_NUM,KC_SPC), LT(_NAV, KC_TAB), LT(_SYM, KC_BSPC), KC_ENT, LALT_T(KC_DEL)
),
[_ALPHA_COLEMAK] = LAYOUT_split_3x5_3(
KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT,
KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O,
LSFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SCLN),
LCTL_T(KC_ENT), LT(_NUM,KC_SPC), LT(_NAV, KC_TAB), LT(_SYM, KC_BSPC), KC_ENT, LALT_T(KC_DEL)
),
[_SYM] = LAYOUT_split_3x5_3(
KC_GRV , KC_CIRC, KC_AT, KC_DLR, KC_TILD, KC_AMPR, KC_EXLM, KC_PIPE, KC_UNDS, KC_HASH,
KC_SLSH, KC_LBRC, KC_LCBR, KC_LPRN, KC_EQL, KC_ASTR, KC_RPRN, KC_RCBR, KC_RBRC, KC_BSLS,
_______, KC_QUES, KC_PLUS, KC_PERC, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, XXXXXXX, _______,
XXXXXXX, MO(_CFG), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
),
[_NAV] = LAYOUT_split_3x5_3(
XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, KC_PGDN, KC_UP, KC_PGUP, KC_DEL,
KC_MPRV, KC_MPLY, KC_MSTP, KC_MNXT, XXXXXXX, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MO(_CFG), XXXXXXX
),
[_NUM] = LAYOUT_split_3x5_3(
XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, KC_PPLS, KC_P7, KC_P8, KC_P9, KC_PSLS,
XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_P0, KC_P4, KC_P5, KC_P6, KC_PDOT,
XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_PMNS, KC_P1, KC_P2, KC_P3, KC_PAST,
XXXXXXX, XXXXXXX, XXXXXXX, KC_PEQL, KC_PENT, XXXXXXX
),
[_CFG] = LAYOUT_split_3x5_3(
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,DF(_ALPHA_QWERTY), DF(_ALPHA_COLEMAK),
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
),
// clang-format on
};
2 changes: 2 additions & 0 deletions keyboards/keycapsss/3w6_2040/keymaps/vial/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
VIA_ENABLE = yes
VIAL_ENABLE = yes
Loading

0 comments on commit 39713d9

Please sign in to comment.