Skip to content
Open
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
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ My QMK compatible keyboard PCB designs:
* [Goldilocks32](keyboards/goldilocks32), using an PR2040 'Pro Micro' controller with
25 GPIO pins for 32 (or 30) keys and a 5-way directional button (6KRO without the
navigation button).
* [Rugby Union](keyboards/rugby_union), using an PR2040 'Pro Micro' controller with
25 GPIO pins for 30 keys and 8KRO.

You can [download pre-compiled firmware](https://github.com/peterjc/qmk_userspace/releases).
An 'offical' release is recommended, the 'latest' binaries may contain experimental changes.
An 'official' release is recommended, the 'latest' binaries may contain experimental changes.
The versions with Vial support are strongly recommended as you can the use the
[Vial GUI tool](https://get.vial.today/) to configure your layout by point-and-click
(the default layout is deliberately very minimal).
Expand Down
65 changes: 65 additions & 0 deletions keyboards/rugby_union/keyboard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"manufacturer": "peterjc",
"keyboard_name": "Rugby Union",
"maintainer": "Peter J. A. Cock",
"bootloader": "rp2040",
"diode_direction": "COL2ROW",
"features": {
"bootmagic": true,
"extrakey": true,
"mousekey": true,
"nkro": false
},
"matrix_pins": {
"cols": ["GP11", "GP20", "GP15", "GP5", "GP10", "GP3", "GP6", "GP12", "GP1", "GP27"],
"rows": ["GP26", "GP14", "GP9", "GP3", "GP23", "GP13", "GP21", "GP28", "GP7", "GP4", "GP2", "GP8", "GP16", "GP22", "GP29"]
},
"processor": "RP2040",
"url": "",
"usb": {
"device_version": "1.0.0",
"pid": "0x0000",
"vid": "0xFEED"
},
"ws2812": {
"driver": "vendor",
"pin": "GP17"
},
"layouts": {
"LAYOUT_default": {
"layout": [

{"label": "q", "hand": "L", "matrix": [0, 0], "x": 0.36, "y": 0.33, "h": 1.4, "r": 10, "rx": 0.86, "ry": 0.83 },
{"label": "w", "hand": "L", "matrix": [0, 1], "x": 1.4, "y": 0.05, "r": 10.0, "rx": 1.9, "ry": 0.55 },
{"label": "e", "hand": "L", "matrix": [1, 2], "x": 2.76, "y": 0.0, "r": 18.0, "rx": 3.26, "ry": 0.5 },
{"label": "r", "hand": "L", "matrix": [2, 3], "x": 3.69, "y": 0.84, "r": 22.0, "rx": 4.19, "ry": 1.34 },
{"label": "t", "hand": "L", "matrix": [3, 4], "x": 4.45, "y": 1.69, "r": 22.0, "rx": 4.95, "ry": 2.19 },
{"label": "y", "hand": "R", "matrix": [5, 5], "x": 7.0, "y": 1.69, "r": -22.0, "rx": 7.5, "ry": 2.19 },
{"label": "u", "hand": "R", "matrix": [8, 6], "x": 7.76, "y": 0.84, "r": -22.0, "rx": 8.26, "ry": 1.34 },
{"label": "i", "hand": "R", "matrix": [6, 7], "x": 8.7, "y": 0.0, "r": -18.0, "rx": 9.2, "ry": 0.5 },
{"label": "o", "hand": "R", "matrix": [9, 8], "x": 10.05, "y": 0.05, "r": -10.0, "rx": 10.55, "ry": 0.55 },
{"label": "p", "hand": "R", "matrix": [7, 9], "x": 11.07, "y": 0.33, "h": 1.4, "r": -10, "rx": 10.57, "ry": 0.83 },
{"label": "a", "hand": "L", "matrix": [4, 0], "x": 0.0, "y": 1.65 },
{"label": "s", "hand": "L", "matrix": [1, 1], "x": 1.24, "y": 1.03, "r": 10.0, "rx": 1.74, "ry": 1.53 },
{"label": "d", "hand": "L", "matrix": [2, 2], "x": 2.46, "y": 0.95, "r": 18.0, "rx": 2.96, "ry": 1.45 },
{"label": "f", "hand": "L", "matrix": [3, 3], "x": 3.34, "y": 1.77, "r": 22.0, "rx": 3.84, "ry": 2.27 },
{"label": "g", "hand": "L", "matrix": [4, 4], "x": 4.1, "y": 2.62, "r": 22.0, "rx": 4.6, "ry": 3.12 },
{"label": "h", "hand": "R", "matrix": [10, 5], "x": 7.35, "y": 2.62, "r": -22.0, "rx": 7.85, "ry": 3.12 },
{"label": "j", "hand": "R", "matrix": [10, 6], "x": 8.11, "y": 1.77, "r": -22.0, "rx": 8.61, "ry": 2.27 },
{"label": "k", "hand": "R", "matrix": [11, 7], "x": 8.99, "y": 0.95, "r": -18.0, "rx": 9.49, "ry": 1.45 },
{"label": "l", "hand": "R", "matrix": [12, 8], "x": 10.22, "y": 1.03, "r": -10.0, "rx": 10.72, "ry": 1.53 },
{"label": ";", "hand": "R", "matrix": [13, 9], "x": 11.45, "y": 1.65 },
{"label": "z", "hand": "L", "matrix": [5, 0], "x": 0.0, "y": 2.65 },
{"label": "x", "hand": "L", "matrix": [6, 1], "x": 1.07, "y": 2.02, "r": 10.0, "rx": 1.57, "ry": 2.52 },
{"label": "c", "hand": "L", "matrix": [7, 2], "x": 2.17, "y": 1.9, "r": 18.0, "rx": 2.67, "ry": 2.4 },
{"label": "v", "hand": "L", "matrix": [8, 3], "x": 2.99, "y": 2.7, "r": 22.0, "rx": 3.49, "ry": 3.2 },
{"label": "b", "hand": "L", "matrix": [9, 4], "x": 3.48, "y": 4.01, "r": 37.0, "rx": 3.98, "ry": 4.51 },
{"label": "n", "hand": "R", "matrix": [14, 5], "x": 7.97, "y": 4.01, "r": -37.0, "rx": 8.47, "ry": 4.51 },
{"label": "m", "hand": "R", "matrix": [11, 6], "x": 8.46, "y": 2.7, "r": -22.0, "rx": 8.96, "ry": 3.2 },
{"label": ",", "hand": "R", "matrix": [12, 7], "x": 9.28, "y": 1.9, "r": -18.0, "rx": 9.78, "ry": 2.4 },
{"label": ".", "hand": "R", "matrix": [13, 8], "x": 10.38, "y": 2.02, "r": -10.0, "rx": 10.88, "ry": 2.52 },
{"label": "/", "hand": "R", "matrix": [14, 9], "x": 11.45, "y": 2.65 }
]
}
}
}
32 changes: 32 additions & 0 deletions keyboards/rugby_union/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Copyright 2023 QMK
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Physical layout close to this:
*
* ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐
* │ Q │ W │ E │ R ├───┐ ┌───┤ U │ I │ O │ P │
* ├───┼───┼───┼───┤ T │ │ Y ├───┼───┼───┼───┤
* │ A │ S │ D │ F ├───┤ ├───┤ J │ K │ L │ ; │
* ├───┼───┼───┼───┤ G │ │ H ├───┼───┼───┼───┤
* │ Z │ X │ C │ V ├───┘ └───┤ M │ , │ . │ / │
* └───┴───┴───┴───┘ └───┴───┴───┴───┘
* ┌───┐ ┌───┐
* │ B │ │ N │
* └───┘ └───┘
*
* The logical layout here is 3 rows of 10:
*
* Q W E R T Y U I O P
* A S D F G H J K L ;
* Z X C V B N M , . /
*
*/
[0] = LAYOUT_default(
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,
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
)
};
10 changes: 10 additions & 0 deletions keyboards/rugby_union/keymaps/vial/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#pragma once

/* Randomly generated as per Vial docs */
#define VIAL_KEYBOARD_UID {0x1C, 0xF4, 0xA2, 0x03, 0x11, 0x30, 0xC7, 0x54}

#define DYNAMIC_KEYMAP_LAYER_COUNT 6

/* Top left key at matrix 0,0 (Q) and top right of left hand at matrix 3,4 (T) */
#define VIAL_UNLOCK_COMBO_ROWS { 0, 0 }
#define VIAL_UNLOCK_COMBO_COLS { 3, 4 }
1 change: 1 addition & 0 deletions keyboards/rugby_union/keymaps/vial/keymap.c
2 changes: 2 additions & 0 deletions keyboards/rugby_union/keymaps/vial/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
VIA_ENABLE = yes
VIAL_ENABLE = yes
43 changes: 43 additions & 0 deletions keyboards/rugby_union/keymaps/vial/vial.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"layouts": {
"keymap":
[
[{"r":32,"rx":1.64,"ry":0.69,"x":-0.5,"y":-0.69,"h":1.5,"h2":1},"0,0"],
[{"rx":2.69,"ry":0.86,"x":-0.45999999999999996,"y":-0.5},"0,1"],
[{"r":40,"rx":3.96,"ry":1.34,"x":-0.5,"y":-0.5000000000000001},"0,2"],
[{"r":44,"rx":4.53,"ry":2.49,"x":-0.5,"y":-0.5000000000000002},"0,3"],
[{"rx":4.93,"ry":3.58,"x":-0.5,"y":-0.5},"0,4"],
[{"r":-44,"rx":7.82,"x":-0.5,"y":-0.5},"0,5"],
[{"rx":8.22,"ry":2.5,"x":-0.5000000000000009,"y":-0.5},"0,6"],
[{"r":-40,"rx":8.79,"ry":1.35,"x":-0.5,"y":-0.5000000000000001},"0,7"],
[{"r":-32,"rx":10.06,"ry":0.86,"x":-0.5099999999999998,"y":-0.5},"0,8"],
[{"rx":11.11,"ry":0.7,"x":-0.5,"y":-0.7,"h":1.5,"h2":1},"0,9"],
[{"r":22,"rx":0.84,"ry":1.76,"x":-0.49999999999999994,"y":-0.5},"1,0"],
[{"r":32,"rx":2.2,"ry":1.68,"x":-0.5000000000000002,"y":-0.5},"1,1"],
[{"r":40,"rx":3.37,"ry":2.09,"x":-0.5,"y":-0.4999999999999998},"1,2"],
[{"r":44,"rx":3.89,"ry":3.19,"x":-0.5,"y":-0.5},"1,3"],
[{"rx":4.29,"ry":4.28,"x":-0.5,"y":-0.5000000000000004},"1,4"],
[{"r":-44,"rx":8.45,"x":-0.4999999999999991,"y":-0.5000000000000004},"1,5"],
[{"rx":8.86,"ry":3.2,"x":-0.5,"y":-0.5},"1,6"],
[{"r":-40,"rx":9.38,"ry":2.09,"x":-0.5,"y":-0.4999999999999998},"1,7"],
[{"r":-32,"rx":10.54,"ry":1.69,"x":-0.5,"y":-0.5},"1,8"],
[{"r":-22,"rx":11.9,"ry":1.77,"x":-0.5,"y":-0.5},"1,9"],
[{"r":22,"rx":0.5,"ry":2.66,"x":-0.5,"y":-0.5},"2,0"],
[{"r":32,"rx":1.72,"ry":2.5,"x":-0.52,"y":-0.5},"2,1"],
[{"r":40,"rx":2.78,"ry":2.83,"x":-0.5,"y":-0.5},"2,2"],
[{"r":44,"rx":3.25,"ry":3.89,"x":-0.5,"y":-0.5},"2,3"],
[{"r":59,"rx":3.6,"ry":5.7,"x":-0.8799999999999999,"y":-0.5,"w":1.75,"w2":1},"2,4"],
[{"r":-59,"rx":9.15,"x":-0.870000000000001,"y":-0.5,"w":1.75,"w2":1},"2,5"],
[{"r":-44,"rx":9.49,"ry":3.9,"x":-0.5,"y":-0.5},"2,6"],
[{"r":-40,"rx":9.97,"ry":2.84,"x":-0.5,"y":-0.5},"2,7"],
[{"r":-32,"rx":11.03,"ry":2.51,"x":-0.47999999999999865,"y":-0.5},"2,8"],
[{"r":-22,"rx":12.25,"ry":2.67,"x":-0.5,"y":-0.5},"2,9"]
]
},
"lighting": "none",
"matrix": {
"cols": 10,
"rows": 15
},
"name": "Rugby Union"
}
79 changes: 79 additions & 0 deletions keyboards/rugby_union/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Rugby Union keyboard firmware

You can [download pre-compiled Rugby Union firmware](https://github.com/peterjc/qmk_userspace/releases),
`rugby_union_vial.uf2` with Vial support which is recommended as you can the use
the [Vial GUI tool](https://get.vial.today/) to configure your layout by point-and-click.
This is the default keymap:

![Default keymap for the Rugby Union keyboard QMK firmware](../../keymap-drawer/rugby_union.svg)

This is firmware for a Raspberry Pi PR2040 (or potentially RP2350) 'Pro Micro' controller
tented monoblock 30 key design with only one key per thumb, my
[Rugby Union keyboard](https://codeberg.org/peterjc/pico-keyboards/src/branch/main/rugby_union).

This is a *diode-free* design with a sparse 10 by 15 scanning matrix designed using this
[25 vertex girth 10 graph with 30 edges](https://houseofgraphs.org/graphs/45469).
Using 25 vertices or GPIO pins, with 30 edges or keys, we get 8KRO. See this
[blog post](https://astrobeano.blogspot.com/2025/05/topology-meets-custom-keyboard-circuit.html)
for background.

This matrix shows the 10×15 sparse bipartite scanning matrix. The keys are assigned so the
scanning column order matches the physical columns (starting with Q, A and Z as the first
column), with the scanning rows sorted to ensure Q is top left as the first matrix entry.
The allocation of keys to matrix elements and scanning matrix rows and columns
to GPIO pins was arbitrary and down to how easy it was to layout the PCB traces:

|R/C|C0 |C1 |C2 |C3 |C4 |C5 |C6 |C7 |C8 |C9 |
|--:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
|R0 | Q | W | | | | | | | | |
|R1 | | S | E | | | | | | | |
|R2 | | | D | R | | | | | | |
|R3 | | | | F | T | | | | | |
|R4 | A | | | | G | | | | | |
|R5 | Z | | | | | Y | | | | |
|R6 | | X | | | | | | I | | |
|R7 | | | C | | | | | | | P |
|R8 | | | | V | | | U | | | |
|R9 | | | | | B | | | | O | |
|R10| | | | | | H | J | | | |
|R11| | | | | | | M | K | | |
|R12| | | | | | | | , | L | |
|R13| | | | | | | | | . | ; |
|R14| | | | | | N | | | | / |

Note there are two entries for each row, and three for each column.
The keys here are labeled as per Qwerty, with B and N for the thumbs,

| Q | W | E | R | T | | Y | U | I | O | P |
|:-:|:-:|:-:|:-:|:-:|:-----:|:-:|:-:|:-:|:-:|:-:|
| A | S | D | F | G | | H | J | K | L | - |
| Z | X | C | V | B | | N | M | , | . | / |

This minimal default layout is rendered as an image above.

* Keyboard Maintainer: [Peter J. A. Cock](https://github.com/peterjc)
* Hardware Supported: Rugby Union (no-diode twin PCB) using Raspberry Pi Pico
* Hardware Availability: https://codeberg.org/peterjc/pico-keyboards/src/branch/main/rugby_union
* Download Firmware pre-compiled with Vial support: [rugby_union_vial.uf2](https://github.com/peterjc/qmk_userspace/releases/download/latest/rugby_union_vial.uf2)

See also the [Rugby Union ZMK firmware](https://github.com/peterjc/zmk-keyboard-graph-theory/tree/main/boards/shields/rugby_union).

## Compiling

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

make rugby_union:default

Flashing example for this keyboard:

make rugby_union: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 (top left key, Qwerty `Q`) and plug in the keyboard
* **Physical reset button**: Briefly press the button on the front of the controller (if physically accessible from the front of the keyboard)
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
Loading