From c514e690b28e5b3b5c8fb9f12fb18438494a2210 Mon Sep 17 00:00:00 2001
From: "Peter J. A. Cock"
Date: Fri, 22 May 2026 17:24:21 +0900
Subject: [PATCH 1/3] Add Rugby Union readme (based on my ZMK version)
---
README.md | 4 +-
keyboards/rugby_union/readme.md | 79 +++++++++++++++++++++++++++++++++
2 files changed, 82 insertions(+), 1 deletion(-)
create mode 100644 keyboards/rugby_union/readme.md
diff --git a/README.md b/README.md
index 8816aec..066f194 100644
--- a/README.md
+++ b/README.md
@@ -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).
diff --git a/keyboards/rugby_union/readme.md b/keyboards/rugby_union/readme.md
new file mode 100644
index 0000000..3705718
--- /dev/null
+++ b/keyboards/rugby_union/readme.md
@@ -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:
+
+
+
+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
From 34beeebf00e4901fde4a3544a629bb9f7b8d5792 Mon Sep 17 00:00:00 2001
From: "Peter J. A. Cock"
Date: Fri, 22 May 2026 23:24:54 +0900
Subject: [PATCH 2/3] Convert Rugby Union ZMK firmware to QMK
Used https://shield-wizard.genteure.com/ for the DTSI to
KLE JSON for the Vial physical layout.
---
keyboards/rugby_union/keyboard.json | 65 +++++++++++++++++++
.../rugby_union/keymaps/default/keymap.c | 32 +++++++++
keyboards/rugby_union/keymaps/vial/config.h | 10 +++
keyboards/rugby_union/keymaps/vial/keymap.c | 1 +
keyboards/rugby_union/keymaps/vial/rules.mk | 2 +
keyboards/rugby_union/keymaps/vial/vial.json | 43 ++++++++++++
6 files changed, 153 insertions(+)
create mode 100644 keyboards/rugby_union/keyboard.json
create mode 100644 keyboards/rugby_union/keymaps/default/keymap.c
create mode 100644 keyboards/rugby_union/keymaps/vial/config.h
create mode 120000 keyboards/rugby_union/keymaps/vial/keymap.c
create mode 100644 keyboards/rugby_union/keymaps/vial/rules.mk
create mode 100644 keyboards/rugby_union/keymaps/vial/vial.json
diff --git a/keyboards/rugby_union/keyboard.json b/keyboards/rugby_union/keyboard.json
new file mode 100644
index 0000000..50d334f
--- /dev/null
+++ b/keyboards/rugby_union/keyboard.json
@@ -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 }
+ ]
+ }
+ }
+}
diff --git a/keyboards/rugby_union/keymaps/default/keymap.c b/keyboards/rugby_union/keymaps/default/keymap.c
new file mode 100644
index 0000000..14aa16b
--- /dev/null
+++ b/keyboards/rugby_union/keymaps/default/keymap.c
@@ -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,
+ )
+};
diff --git a/keyboards/rugby_union/keymaps/vial/config.h b/keyboards/rugby_union/keymaps/vial/config.h
new file mode 100644
index 0000000..8ca6122
--- /dev/null
+++ b/keyboards/rugby_union/keymaps/vial/config.h
@@ -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 }
diff --git a/keyboards/rugby_union/keymaps/vial/keymap.c b/keyboards/rugby_union/keymaps/vial/keymap.c
new file mode 120000
index 0000000..41460f2
--- /dev/null
+++ b/keyboards/rugby_union/keymaps/vial/keymap.c
@@ -0,0 +1 @@
+../default/keymap.c
\ No newline at end of file
diff --git a/keyboards/rugby_union/keymaps/vial/rules.mk b/keyboards/rugby_union/keymaps/vial/rules.mk
new file mode 100644
index 0000000..4f7618e
--- /dev/null
+++ b/keyboards/rugby_union/keymaps/vial/rules.mk
@@ -0,0 +1,2 @@
+VIA_ENABLE = yes
+VIAL_ENABLE = yes
diff --git a/keyboards/rugby_union/keymaps/vial/vial.json b/keyboards/rugby_union/keymaps/vial/vial.json
new file mode 100644
index 0000000..6652fc5
--- /dev/null
+++ b/keyboards/rugby_union/keymaps/vial/vial.json
@@ -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"
+}
From f41600d261bb1b03962803135a63c37bbefbc9c1 Mon Sep 17 00:00:00 2001
From: peterjc <63959+peterjc@users.noreply.github.com>
Date: Fri, 22 May 2026 14:26:45 +0000
Subject: [PATCH 3/3] Automatic keymap-drawer render
[ci skip]
---
keymap-drawer/rugby_union.svg | 252 ++++++++++++++++++++++++++++++++++
1 file changed, 252 insertions(+)
create mode 100644 keymap-drawer/rugby_union.svg
diff --git a/keymap-drawer/rugby_union.svg b/keymap-drawer/rugby_union.svg
new file mode 100644
index 0000000..6bb4a45
--- /dev/null
+++ b/keymap-drawer/rugby_union.svg
@@ -0,0 +1,252 @@
+