Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for the Smallcat #810

Merged
merged 11 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions keyboards/smallcat/keyboard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"manufacturer": "Matt Petiteau",
"keyboard_name": "smallcat",
"url": "https://github.com/smallwat3r/smallcat",
"maintainer": "smallwat3r",
"usb": {
"vid": "0xFEED",
"pid": "0x0000",
"device_version": "1.0.0"
},
"board": "GENERIC_RP_RP2040",
"bootloader": "rp2040",
"processor": "RP2040",
"features": {
"extrakey": true,
"mousekey": true,
"unicode": true
},
"matrix_pins": {
"direct": [
[null, "GP26", "GP27", "GP28", null],
["GP15", "GP14", "GP13", "GP12", "GP0"],
[null, "GP5", "GP6", "GP7", null],
["GP10", "GP11", null, null, null]
]
},
"split": {
"enabled": true,
"matrix_pins": {
"right": {
"direct": [
[null, "GP28", "GP27", "GP26", null],
["GP0", "GP12", "GP13", "GP14", "GP15"],
[null, "GP7", "GP6", "GP5", null],
["GP11", "GP10", null, null, null]
]
}
},
"serial": {
"pin": "GP1",
"driver": "vendor"
}
},
"community_layouts": ["split_3x5_2"],
"layout_aliases": {
"LAYOUT": "LAYOUT_split_3x5_2"
},
"layouts": {
"LAYOUT_split_3x5_2": {
"layout":
[
{"x": 1, "y": 0.31, "matrix": [0, 1]},
{"x": 2, "y": 0, "matrix": [0, 2]},
{"x": 3, "y": 0.28, "matrix": [0, 3]},

{"x": 8, "y": 0.28, "matrix": [4, 1]},
{"x": 9, "y": 0, "matrix": [4, 2]},
{"x": 10, "y": 0.31, "matrix": [4, 3]},

{"x": 0, "y": 1.93, "matrix": [1, 0]},
{"x": 1, "y": 1.31, "matrix": [1, 1]},
{"x": 2, "y": 1, "matrix": [1, 2]},
{"x": 3, "y": 1.28, "matrix": [1, 3]},
{"x": 4, "y": 1.42, "matrix": [1, 4]},

{"x": 7, "y": 1.42, "matrix": [5, 0]},
{"x": 8, "y": 1.28, "matrix": [5, 1]},
{"x": 9, "y": 1, "matrix": [5, 2]},
{"x": 10, "y": 1.31, "matrix": [5, 3]},
{"x": 11, "y": 1.93, "matrix": [5, 4]},

{"x": 1, "y": 2.31, "matrix": [2, 1]},
{"x": 2, "y": 2, "matrix": [2, 2]},
{"x": 3, "y": 2.28, "matrix": [2, 3]},

{"x": 8, "y": 2.28, "matrix": [6, 1]},
{"x": 9, "y": 2, "matrix": [6, 2]},
{"x": 10, "y": 2.31, "matrix": [6, 3]},

{"x": 3.5, "y": 3.75, "matrix": [3, 0]},
{"x": 4.5, "y": 4, "matrix": [3, 1]},

{"x": 6.5, "y": 4, "matrix": [7, 0]},
{"x": 7.5, "y": 3.75, "matrix": [7, 1]}
]
}
}
}
27 changes: 27 additions & 0 deletions keyboards/smallcat/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include QMK_KEYBOARD_H

/* default generic keymap */
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_split_3x5_2(
KC_W, KC_F, KC_P, KC_L, KC_U, KC_Y,
KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O,
KC_Q, KC_C, KC_D, KC_H, KC_COMM, KC_DOT,
KC_TRNS, KC_SPC, KC_BSPC, KC_ENT
)
};

/* combo definitions */
const uint16_t PROGMEM combo_x[] = {KC_W, KC_F, COMBO_END};
const uint16_t PROGMEM combo_b[] = {KC_F, KC_P, COMBO_END};
const uint16_t PROGMEM combo_z[] = {KC_Q, KC_C, COMBO_END};
const uint16_t PROGMEM combo_v[] = {KC_C, KC_D, COMBO_END};
const uint16_t PROGMEM combo_j[] = {KC_L, KC_U, COMBO_END};
const uint16_t PROGMEM combo_k[] = {KC_H, KC_COMM, COMBO_END};
combo_t key_combos[] = {
COMBO(combo_x, KC_X),
COMBO(combo_b, KC_B),
COMBO(combo_z, KC_Z),
COMBO(combo_v, KC_V),
COMBO(combo_j, KC_J),
COMBO(combo_k, KC_K),
};
1 change: 1 addition & 0 deletions keyboards/smallcat/keymaps/default/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
COMBO_ENABLE = yes
25 changes: 25 additions & 0 deletions keyboards/smallcat/keymaps/vial/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */

#pragma once

#define DYNAMIC_KEYMAP_LAYER_COUNT 8
#define VIAL_TAP_DANCE_ENTRIES 20
#define VIAL_COMBO_ENTRIES 40

#define VIAL_KEYBOARD_UID {0xDA, 0x2A, 0xFA, 0x9D, 0x66, 0xE4, 0x31, 0x52}
#define VIAL_UNLOCK_COMBO_ROWS { 0, 1 }
#define VIAL_UNLOCK_COMBO_COLS { 1, 4 }

#define NO_ALT_REPEAT_KEY

/* make use of the mounted WS2812 led from the Waveshare RP2040-zero */
#ifdef RGBLIGHT_ENABLE
# define RGBLIGHT_LED_COUNT 1
# define RGBLIGHT_SPLIT
# define RGBLIGHT_DEFAULT_HUE 110
# define RGBLIGHT_LIMIT_VAL 10
# define RGBLIGHT_SLEEP
# define RGBLIGHT_LAYERS
# define RGBLIGHT_HUE_STEP 20
# define WS2812_DI_PIN GP16
#endif
31 changes: 31 additions & 0 deletions keyboards/smallcat/keymaps/vial/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#include QMK_KEYBOARD_H

#ifdef RGBLIGHT_ENABLE
const rgblight_segment_t PROGMEM capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 1, HSV_RED});
const rgblight_segment_t PROGMEM osm_shift_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 1, HSV_YELLOW});

const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST(capslock_layer, osm_shift_layer);
void keyboard_post_init_user(void) { rgblight_layers = rgb_layers; }

/* light up led in red when caps lock in on */
bool led_update_user(led_t led_state) {
rgblight_set_layer_state(0, led_state.caps_lock);
return true;
}

/* light up led in yellow when sticky shift is activated */
void oneshot_mods_changed_user(uint8_t mods) {
if (mods & MOD_MASK_SHIFT) { rgblight_set_layer_state(1, true); }
if (!mods) { rgblight_set_layer_state(1, false); }
}
#endif

/* default empty layout */
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_split_3x5_2(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
)
};
15 changes: 15 additions & 0 deletions keyboards/smallcat/keymaps/vial/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
VIA_ENABLE = yes
VIAL_ENABLE = yes
LTO_ENABLE = yes
TAP_DANCE_ENABLE = yes
MOUSEKEY_ENABLE = yes
EXTRAKEY_ENABLE = yes
REPEAT_KEY_ENABLE = yes
COMBO_ENABLE = yes
QMK_SETTINGS = yes

RGBLIGHT_ENABLE = yes
WS2812_DRIVER = vendor

KEY_OVERRIDE_ENABLE = no
VIAL_INSECURE = no
144 changes: 144 additions & 0 deletions keyboards/smallcat/keymaps/vial/vial.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
{
"name": "smallcat",
"firmwareVersion": 0,
"keycodes": [
"via/keycodes"
],
"menus": [
"via/keymap",
"via/layouts",
"via/macros",
"via/save_load"
],
"matrix": {
"rows": 8,
"cols": 5
},
"layouts": {
"keymap": [
[
{
"x": 2
},
"0,2",
{
"x": 5.25
},
"4,2"
],
[
{
"y": -0.75,
"x": 1
},
"0,1",
{
"x": 1
},
"0,3",
{
"x": 3.25
},
"4,1",
{
"x": 1
},
"4,3"
],
[
{
"y": -0.25,
"x": 2
},
"1,2",
{
"x": 5.25
},
"5,2"
],
[
{
"y": -0.75,
"x": 1
},
"1,1",
{
"x": 1
},
"1,3",
"1,4",
{
"x": 1.25
},
"5,0",
"5,1",
{
"x": 1
},
"5,3"
],
[
{
"y": -0.5
},
"1,0",
{
"x": 9.25
},
"5,4"
],
[
{
"y": -0.75,
"x": 2
},
"2,2",
{
"x": 5.25
},
"6,2"
],
[
{
"y": -0.75,
"x": 1
},
"2,1",
{
"x": 1
},
"2,3",
{
"x": 3.25
},
"6,1",
{
"x": 1
},
"6,3"
],
[
{
"y": 0.25,
"x": 3.5
},
"3,0",
{
"x": 2.25
},
"7,1"
],
[
{
"y": -0.75,
"x": 4.5
},
"3,1",
{
"x": 0.25
},
"7,0"
]
]
}
}
13 changes: 13 additions & 0 deletions keyboards/smallcat/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Smallcat

![smallcat](https://raw.githubusercontent.com/smallwat3r/smallcat/refs/heads/main/images/smallcat.png)

A 26-key split keyboard. [More info](https://github.com/smallwat3r/smallcat).

* Keyboard Maintainer: [Matt Petiteau](https://github.com/smallwat3r/)

Make example for this keyboard (after setting up your build environment):

make smallcat:vial

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).