diff --git a/keyboards/slump52/keyboard.json b/keyboards/slump52/keyboard.json new file mode 100644 index 00000000..ef1e3cc5 --- /dev/null +++ b/keyboards/slump52/keyboard.json @@ -0,0 +1,88 @@ +{ + "manufacturer": "peterjc", + "keyboard_name": "Slump52", + "maintainer": "Peter J. A. Cock", + "bootloader": "rp2040", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": false + }, + "matrix_pins": { + "cols": ["GP28", "GP26", "GP16", "GP15", "GP8", "GP7", "GP6", "GP5", "GP4", "GP3", "GP2", "GP1", "GP0"], + "rows": ["GP27", "GP22", "GP21", "GP20", "GP19", "GP18", "GP17", "GP14", "GP13", "GP12", "GP11", "GP10", "GP9"] + }, + "indicators": { + "caps_lock": "GP25" + }, + "processor": "RP2040", + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEED" + }, + "layouts": { + "LAYOUT_default": { + "layout": [ + {"label": "Esc", "matrix": [0, 0], "row": 0, "col": 0, "x": 0, "y": 0 }, + {"label": "q", "matrix": [1, 0], "row": 0, "col": 1, "x": 1.025, "y": 0.027, "r": 3, "rx": 1.525, "ry": 0.527 }, + {"label": "w", "matrix": [0, 1], "row": 0, "col": 2, "x": 2.092, "y": 0.167, "r": 12, "rx": 2.592, "ry": 0.667 }, + {"label": "e", "matrix": [0, 2], "row": 0, "col": 3, "x": 3.123, "y": 0.473, "r": 21, "rx": 3.623, "ry": 0.973 }, + {"label": "r", "matrix": [0, 3], "row": 0, "col": 4, "x": 4.075, "y": 0.877, "r": 25, "rx": 4.575, "ry": 1.377 }, + {"label": "t", "matrix": [1, 4], "row": 0, "col": 5, "x": 4.77, "y": 1.753, "r": 25, "rx": 5.27, "ry": 2.253 }, + {"label": "y", "matrix": [1, 5], "row": 0, "col": 9, "x": 6.616, "y": 1.753, "r": -25, "rx": 7.116, "ry": 2.253 }, + {"label": "u", "matrix": [1, 6], "row": 0, "col": 10, "x": 7.311, "y": 0.877, "r": -25, "rx": 7.811, "ry": 1.377 }, + {"label": "i", "matrix": [2, 7], "row": 0, "col": 11, "x": 8.263, "y": 0.473, "r": -21, "rx": 8.763, "ry": 0.973 }, + {"label": "o", "matrix": [2, 8], "row": 0, "col": 12, "x": 9.294, "y": 0.167, "r": -12, "rx": 9.794, "ry": 0.667 }, + {"label": "p", "matrix": [2, 9], "row": 0, "col": 13, "x": 10.36, "y": 0.027, "r": -3, "rx": 10.86, "ry": 0.527 }, + {"label": "+=", "matrix": [6, 9], "row": 0, "col": 14, "x": 11.385, "y": 0 }, + {"label": "7", "matrix": [3, 10], "row": 0, "col": 15, "x": 12.385, "y": 0 }, + {"label": "8", "matrix": [3, 11], "row": 0, "col": 16, "x": 13.385, "y": 0 }, + {"label": "9", "matrix": [3, 12], "row": 0, "col": 17, "x": 14.385, "y": 0 }, + + {"label": "a", "matrix": [2, 0], "row": 1, "col": 1, "x": 0, "y": 0.997 }, + {"label": "s", "matrix": [4, 1], "row": 1, "col": 2, "x": 1.333, "y": 1.077, "r": 7, "rx": 1.833, "ry": 1.577 }, + {"label": "d", "matrix": [7, 2], "row": 1, "col": 3, "x": 2.66, "y": 1.381, "r": 19, "rx": 3.16, "ry": 1.881 }, + {"label": "f", "matrix": [10, 3], "row": 1, "col": 4, "x": 3.652, "y": 1.783, "r": 25, "rx": 4.152, "ry": 2.283 }, + {"label": "g", "matrix": [11, 3], "row": 1, "col": 5, "x": 4.347, "y": 2.659, "r": 25, "rx": 4.847, "ry": 3.159 }, + {"label": "h", "matrix": [5, 5], "row": 1, "col": 9, "x": 7.038, "y": 2.659, "r": -25, "rx": 7.538, "ry": 3.159 }, + {"label": "j", "matrix": [6, 6], "row": 1, "col": 10, "x": 7.733, "y": 1.783, "r": -25, "rx": 8.233, "ry": 2.283 }, + {"label": "k", "matrix": [4, 7], "row": 1, "col": 11, "x": 8.726, "y": 1.381, "r": -19, "rx": 9.226, "ry": 1.881 }, + {"label": "l", "matrix": [5, 8], "row": 1, "col": 12, "x": 10.052, "y": 1.077, "r": -7, "rx": 10.552, "ry": 1.577 }, + {"label": "-", "matrix": [8, 9], "row": 1, "col": 13, "x": 11.385, "y": 0.997 }, + {"label": "4", "matrix": [4, 10], "row": 1, "col": 15, "x": 12.385, "y": 1 }, + {"label": "5", "matrix": [5, 11], "row": 1, "col": 16, "x": 13.385, "y": 1 }, + {"label": "6", "matrix": [6, 12], "row": 1, "col": 17, "x": 14.385, "y": 1 }, + + {"label": "z", "matrix": [3, 0], "row": 2, "col": 1, "x": 0, "y": 1.997 }, + {"label": "x", "matrix": [5, 1], "row": 2, "col": 2, "x": 1.094, "y": 2.07, "r": 7, "rx": 1.594, "ry": 2.57 }, + {"label": "c", "matrix": [8, 2], "row": 2, "col": 3, "x": 2.186, "y": 2.296, "r": 16, "rx": 2.686, "ry": 2.796 }, + {"label": "v", "matrix": [9, 2], "row": 2, "col": 4, "x": 3.23, "y": 2.689, "r": 25, "rx": 3.73, "ry": 3.189 }, + {"label": "b", "matrix": [12, 3], "row": 2, "col": 5, "x": 3.925, "y": 3.565, "r": 25, "rx": 4.425, "ry": 4.065 }, + {"label": "n", "matrix": [8, 5], "row": 2, "col": 9, "x": 7.461, "y": 3.565, "r": -25, "rx": 7.961, "ry": 4.065 }, + {"label": "m", "matrix": [9, 6], "row": 2, "col": 10, "x": 8.156, "y": 2.689, "r": -25, "rx": 8.656, "ry": 3.189 }, + {"label": ",", "matrix": [9, 7], "row": 2, "col": 11, "x": 9.199, "y": 2.296, "r": -16, "rx": 9.699, "ry": 2.796 }, + {"label": ".", "matrix": [7, 8], "row": 2, "col": 12, "x": 10.292, "y": 2.07, "r": -7, "rx": 10.792, "ry": 2.57 }, + {"label": "/", "matrix": [10, 9], "row": 2, "col": 13, "x": 11.385, "y": 1.997 }, + {"label": "1", "matrix": [8, 10], "row": 2, "col": 15, "x": 12.385, "y": 2 }, + {"label": "2", "matrix": [9, 11], "row": 2, "col": 16, "x": 13.385, "y": 2 }, + {"label": "3", "matrix": [7, 12], "row": 2, "col": 17, "x": 14.385, "y": 2 }, + + {"label": "Tab", "matrix": [6, 1], "row": 3, "col": 1, "x": 0.1, "y": 3.15, "w":1.75 }, + {"label": "T1", "matrix": [4, 4], "row": 3, "col": 6, "x": 4.863, "y": 4.107, "r": 35, "rx": 5.363, "ry": 4.607 }, + {"label": "T2", "matrix": [7, 4], "row": 3, "col": 7, "x": 5.693, "y": 4.803, "r": -45, "rx": 6.193, "ry": 5.303 }, + {"label": "T3", "matrix": [10, 4], "row": 3, "col": 8, "x": 6.523, "y": 4.107, "r": -35, "rx": 7.023, "ry": 4.607 }, + {"label": "Left", "matrix": [11, 5], "row": 3, "col": 9, "x": 8.423, "y": 4.832, "r": -20.5, "rx": 8.923, "ry": 5.332 }, + {"label": "Down", "matrix": [12, 6], "row": 3, "col": 10, "x": 9.36, "y": 4.481, "r": -20.5, "rx": 9.86, "ry": 4.981 }, + {"label": "Up", "matrix": [11, 7], "row": 3, "col": 11, "x": 9.009, "y": 3.545, "r": -20.5, "rx": 9.509, "ry": 4.045 }, + {"label": "Right", "matrix": [12, 8], "row": 3, "col": 12, "x": 10.296, "y": 4.131, "r": -20.5, "rx": 10.796, "ry": 4.631 }, + {"label": "*", "matrix": [12,10], "row": 3, "col": 13, "x": 11.385, "y": 3 }, + {"label": "0", "matrix": [10,11], "row": 3, "col": 15, "x": 12.385, "y": 3 }, + {"label": "Enter", "matrix": [11,12], "row": 3, "col": 17, "x": 13.5, "y": 3.15, "w":1.75 } + ] + } + } +} diff --git a/keyboards/slump52/keymaps/default/keymap.c b/keyboards/slump52/keymaps/default/keymap.c new file mode 100644 index 00000000..7e0f6642 --- /dev/null +++ b/keyboards/slump52/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ + │ 7 │ 8 │ 9 │ + * └───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ - │ │ 4 │ 5 │ 6 │ + * ├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤ ├───┼───┼───┤ + * │ Z │ X │ C │ V │ B │ │ N │ M │ , │ . │ / │ │ 1 │ 2 │ 3 │ + * └───┴───┴───┴───┴───┼────┬────┬───┼───┴───┴───┴───┼───┤ ├───┼───┴───┘ + * ┌─────┐ │BkSp│Shft│Spc├───┬───┬───┬───┤ * │ │ 0 │ ┌─────┐ + * │ Tab │ └────┴────┴───┤ ← │ ↓ │ ↑ │ → ├───┘ └───┘ │Enter│ + * └─────┘ └───┴───┴───┴───┘ └─────┘ + + * Home-row mods, + * ASDF are Left-GUI, Left-Alt, Left-Ctrl, Left-Shift + * JKL- are Right-Shift, Left-Ctrl, Left-Alt, Left-GUI + */ + [0] = LAYOUT_default( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQUAL, KC_7, KC_8, KC_9, + MT(MOD_LGUI, KC_A), MT(MOD_LALT, KC_S), MT(MOD_LCTL, KC_D), MT(MOD_LSFT, KC_F), KC_G, KC_H, MT(MOD_RSFT, KC_J), MT(MOD_LCTL, KC_K), MT(MOD_LALT, KC_L), MT(MOD_LGUI, KC_MINUS), KC_4, KC_5, KC_6, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_1, KC_2, KC_3, + KC_TAB, KC_BSPC, KC_LSFT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_KP_ASTERISK, KC_0, KC_ENT + ) +}; diff --git a/keyboards/slump52/keymaps/vial/config.h b/keyboards/slump52/keymaps/vial/config.h new file mode 100644 index 00000000..931d8982 --- /dev/null +++ b/keyboards/slump52/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, 0x50} + +#define DYNAMIC_KEYMAP_LAYER_COUNT 6 + +/* Top left key at matrix 0,0 (Escape) and top right at matrix 3,12 (numpad 9) */ +#define VIAL_UNLOCK_COMBO_ROWS { 0, 0 } +#define VIAL_UNLOCK_COMBO_COLS { 3, 12 } diff --git a/keyboards/slump52/keymaps/vial/keymap.c b/keyboards/slump52/keymaps/vial/keymap.c new file mode 120000 index 00000000..41460f2f --- /dev/null +++ b/keyboards/slump52/keymaps/vial/keymap.c @@ -0,0 +1 @@ +../default/keymap.c \ No newline at end of file diff --git a/keyboards/slump52/keymaps/vial/rules.mk b/keyboards/slump52/keymaps/vial/rules.mk new file mode 100644 index 00000000..4f7618e9 --- /dev/null +++ b/keyboards/slump52/keymaps/vial/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes diff --git a/keyboards/slump52/keymaps/vial/vial.json b/keyboards/slump52/keymaps/vial/vial.json new file mode 100644 index 00000000..80e7d66d --- /dev/null +++ b/keyboards/slump52/keymaps/vial/vial.json @@ -0,0 +1,17 @@ +{ + "layouts": { + "keymap": + [ + ["0,0", "1,0", "0,1", "0,2", "0,3", "1,4", {"x": 3}, "1,5", "1,6", "2,7", "2,8", "2,9", "6,9", "3,10", "3,11", "3,12"], + [{"x": 1}, "2,0", "4,1", "7,2", "10,3", "11,3", {"x": 3}, "5,5", "6,6", "4,7", "5,8", "8,9", {"x": 1}, "4,10", "5,11", "6,12"], + [{"x": 1}, "3,0", "5,1", "8,2", "9,2", "12,3", {"x": 3}, "8,5", "9,6", "9,7", "7,8", "10,9", {"x": 1}, "8,10", "9,11", "7,12"], + [{"x": 1}, "6,1", {"x": 4}, "4,4", "7,4", "10,4", "11,5", "12,6", "11,7", "12,8", "12,10", {"x": 1}, "10,11", {"x": 1}, "11,12"] + ] + }, + "lighting": "none", + "matrix": { + "cols": 13, + "rows": 13 + }, + "name": "Slump52" +} diff --git a/keyboards/slump52/readme.md b/keyboards/slump52/readme.md new file mode 100644 index 00000000..99cdb63f --- /dev/null +++ b/keyboards/slump52/readme.md @@ -0,0 +1,89 @@ +# Slump52 keyboard firmware + +You can [download pre-compiled Slump52 firmware](https://github.com/peterjc/qmk_userspace/releases), +`slump52_vial.uf2` with Vial support is recommended as you can the use +the [Vial GUI tool](https://get.vial.today/) to configure your layout by point-and-click. + +# Slump52 keyboard firmware + +This is firmware for a Raspberry Pi Pico PR2040 controller monoblock 52 key design +(split 3x5 - three rows of five, with thumb keys, cursors, and numpad), +[my curvy Slump52 keyboard](https://codeberg.org/peterjc/pico-keyboards/src/branch/main/slump52). +This is a *diode-free* design with a sparse 13 by 13 scanning matrix designed using the +[Incidence graph of the projective plane of order 3, PG(2,3)](https://houseofgraphs.org/graphs/44089) +(using only 26 vertices or GPIO pins, with 52 edges or keys - see this +[blog post](https://astrobeano.blogspot.com/2025/05/topology-meets-custom-keyboard-circuit.html) +for background. + +This matrix shows the 13×13 PG(2,3) bipartite scanning matrix in Paige-Wexler +normal form. The keys are assign so the scanning column order roughly matches +the physical columns (starting with Escape, A, Z, tab as the first column), with +the scanning rows sorted to ensure Escape 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: + +| GP | 28 | 26 | 16 | 15 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | O | +|---:|:---:|:---:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:-----:| +| 27 | Esc | W | E | R | | | | | | | | | | +| 22 | Q | | | | T | Y | U | | | | | | | +| 21 | A | | | | | | | I | O | P | | | | +| 20 | Z | | | | | | | | | | 7 | 8 | 9 | +| 19 | | S | | | T1 | | | K | | | 4 | | | +| 18 | | X | | | | H | | | L | | | 5 | | +| 17 | | Tab | | | | | J | | | += | | | 6 | +| 14 | | | D | | T2 | | | | . | | | | 3 | +| 13 | | | C | | | N | | | | - | 1 | | | +| 12 | | | V | | | | M | , | | | | 2 | | +| 11 | | | | F | T3 | | | | | / | | 0 | | +| 10 | | | | G | | ← | | ↑ | | | | | Enter | +| 9 | | | | B | | | ↓ | | → | | * | | | + +The keys here are labeled as per Qwerty, with T1, T2, and T3, for the thumbs, +plus the cursors (in a standard inverted-tee layout, not a row): + +| Esc | Q | W | E | R | T | | | | Y | U | I | O | P | += | 7 | 8 | 9 | +|:---:|:---:|:-:|:-:|:-:|:-:|:--:|:--:|:--:|:-:|:-:|:-:|:-:|:-:|:--:|:-:|:-:|:-----:| +| | A | S | D | F | G | | | | H | J | K | L | - | | 4 | 5 | 6 | +| | Z | X | C | V | B | | | | N | M | , | . | / | | 1 | 2 | 3 | +| | Tab | | | | | T1 | T2 | T3 | ← | ↓ | ↑ | → | * | | 0 | | Enter | + +This default layout replaces Qwerty semicolon/colon with hyphen/underscore (for +use with the numpad as minus), adds an extra key below slash/question-mark (used +for division with the numpad) for multiplication, and places the equals-sign/plus +key at the top of this column (but with plus by default and equals with shift). + +The suggested thumb keys are backspace, shift, and space. The keys labeled as +`Tab` (left) and `*` (right) could be used as a pinky shift instead (or when held). + +Most of the symbols can be used with shift and the numpad, but this and the +remaining punctuation (semicolon, brackets, backslash, pipe, hash, tilde, etc) +can be placed on layers or combos when personalising the layout. + +The Raspberry Pi Pico controller's user LED on GPIO pin 25 is set to show the Caps Lock state. + +* Keyboard Maintainer: [Peter J. A. Cock](https://github.com/peterjc) +* Hardware Supported: Slump52 (no-diode single PCB) using Raspberry Pi Pico +* Hardware Availability: https://codeberg.org/peterjc/pico-keyboards/src/branch/main/slump52 +* Download Firmware pre-compiled with Vial support: [slump52_vial.uf2](https://github.com/peterjc/qmk_userspace/releases/download/latest/slump52_vial.uf2) + +See also the [Slump52 ZMK firmware](https://github.com/peterjc/zmk-keyboard-graph-theory/tree/main/boards/shields/slump52). + +## Compiling + +Make example for this keyboard (after setting up your build environment): + + make slump52:default + +Flashing example for this keyboard: + + make slump52: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 `Escape`) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the front of the controller (if physically accessible) +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/qmk.json b/qmk.json index 16084efa..b6b8cfbf 100644 --- a/qmk.json +++ b/qmk.json @@ -1,6 +1,7 @@ { "userspace_version": "1.1", "build_targets": [ - ["tutte_coxeter_36k", "default"] + ["tutte_coxeter_36k", "default"], + ["slump52", "default"] ] } diff --git a/vial.json b/vial.json index 7bf58507..cc16a71d 100644 --- a/vial.json +++ b/vial.json @@ -1,6 +1,7 @@ { "userspace_version": "1.1", "build_targets": [ - ["tutte_coxeter_36k", "vial"] + ["tutte_coxeter_36k", "vial"], + ["slump52", "vial"] ] }