Add QMK firmware for rev1

This commit is contained in:
Lexi / Zoe 2024-09-28 15:47:29 +02:00
parent 4e7f80ceac
commit 9749bf8f25
Signed by: binaryDiv
GPG Key ID: F8D4956E224DA232
9 changed files with 742 additions and 329 deletions

54
Makefile Normal file
View File

@ -0,0 +1,54 @@
# Set QMK_HOME in your environment variables to adjust the path of the firmware
QMK_HOME ?= ${HOME}/qmk_firmware
# QMK keyboard information (author, keyboard, revision)
QMK_KEYBOARD_AUTHOR := binarydiv
QMK_KEYBOARD_NAME := eepyboard
QMK_KEYBOARD_REV ?= rev1
# Directory structure for QMK keyboard files
QMK_KEYBOARD_AUTHOR_DIR := ${QMK_KEYBOARD_AUTHOR}
QMK_KEYBOARD_BASE_DIR := ${QMK_KEYBOARD_AUTHOR}/${QMK_KEYBOARD_NAME}
QMK_KEYBOARD_REV_DIR := ${QMK_KEYBOARD_AUTHOR}/${QMK_KEYBOARD_NAME}/${QMK_KEYBOARD_REV}
# Keymap to use when compiling QMK firmware
QMK_KEYMAP ?= default
# Set default make target
.DEFAULT_GOAL := qmk-compile
# -- QMK commands
# Prerequisite: Check if QMK is installed
.PHONY: _qmk-check-firmware-installed
_qmk-check-firmware-installed:
@test -d "${QMK_HOME}" || { \
echo "QMK firmware not found! (QMK_HOME=${QMK_HOME})"; \
echo "Please install QMK using 'qmk setup' first or set QMK_HOME in environment."; \
exit 1; \
}
# Create symlink in QMK firmware directory to the keyboard files in qmk_keyboards/
.PHONY: _qmk-create-symlink
_qmk-create-symlink: _qmk-check-firmware-installed ${QMK_HOME}/keyboards/${QMK_KEYBOARD_BASE_DIR}
# Only create symlink if it doesn't exist already
${QMK_HOME}/keyboards/${QMK_KEYBOARD_BASE_DIR}:
mkdir -p "${QMK_HOME}/keyboards/${QMK_KEYBOARD_AUTHOR_DIR}"
ln -s "$$(realpath qmk_keyboards/${QMK_KEYBOARD_BASE_DIR})" "${QMK_HOME}/keyboards/${QMK_KEYBOARD_BASE_DIR}"
# Compile QMK firmware
.PHONY: qmk-compile
qmk-compile: _qmk-create-symlink
qmk compile -kb ${QMK_KEYBOARD_REV_DIR} -km ${QMK_KEYMAP}
# Compile and flash QMK firmware to keyboard
.PHONY: qmk-flash
qmk-flash: _qmk-create-symlink
qmk flash -kb ${QMK_KEYBOARD_REV_DIR} -km ${QMK_KEYMAP}
# Run "qmk config" to set this keyboard as the default (to simplify running qmk commands manually)
.PHONY: qmk-activate
qmk-activate: _qmk-create-symlink
qmk config user.keyboard=${QMK_KEYBOARD_REV_DIR} user.keymap=${QMK_KEYMAP}

View File

@ -2,6 +2,14 @@
Custom ergonomic mechanical keyboard with low-profile (Choc) switches.
## Versions
- **eepyBoard v1.0: Hardware revision 1**
- Mostly ortholinear layout with 13 columns
- Bottom row: two regular keys + four thumb keys (per side, symmetrical)
- Partial F-key row (Esc, F1-F8) and rotary encoder
- RP2040 controller board in upper right corner
## Repository structure
- `/layouts`: Keyboard layouts created with the [Keyboard Layout Editor](http://www.keyboard-layout-editor.com)
@ -78,7 +86,30 @@ Now you can generate the gerber, drill and map files.
### Compile and flash QMK firmware
TODO: Add this when building the firmware
To compile the QMK firmware, you first need the `qmk` CLI and a local copy of the QMK firmware.
1. [Install](https://docs.qmk.fm/#/cli) the `qmk` CLI using your favorite package manager.
2. Run `qmk setup` to clone a local copy of the QMK firmware. (By default in `~/qmk_firmware`, feel free to adjust.)
The firmware for this keyboard is compiled using the local copy of QMK and the keyboard definitions in `qmk_keyboards`
which are automatically symlinked to your installed QMK firmware directory (defaults to `~/qmk_firmware`, can be
overridden by setting `QMK_HOME` in your environment). A Makefile is provided to simplify compiling and flashing.
To compile and flash the firmware, run `make qmk-flash`.
After compiling the firmware, you will be asked to put your keyboard into bootloader mode. This can be done in multiple
ways:
- Hold the BOOTSEL button on the controller board while pressing the reset button (or while plugging in the cable).
- Hold the Escape key while pressing the reset button / plugging in the cable.
- Press the key combination that is mapped to the `QK_BOOTLOADER` keycode (currently Fn + Right Ctrl).
The RP2040 uses UF2 as the default bootloader. This bootloader works by emulating a USB storage device that the firmware
file can be copied on. After putting the RP2040 into bootloader mode, you need to mount the USB storage device (doesn't
matter where). For convenience, it is recommended to enable auto-mounting in your system, e.g. using `udiskie`.
You can also run `make qmk-activate` which will run `qmk config` to set `user.keyboard` and `user.keymap` to this
keyboard. This allows you to use the `qmk` CLI directly without specifying the keyboard and keymap everytime.
## Used software

339
layouts/eepyboard-v1-0.json Normal file
View File

@ -0,0 +1,339 @@
[
{
"name": "eepyBoard v1.0",
"author": "binaryDiv"
},
[
{
"t": "#000000\n\n\n#cc00ff\n\n\n\n\n\n#ff0000",
"fa": [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
]
},
"Esc\n\n\nStopRec",
{
"x": 0.25,
"fa": [
0,
0,
0,
1,
0,
0,
0,
0,
0,
2
]
},
"F1\n\n\nRecord1\n\n\n\n\n\nMacro1",
"F2\n\n\nRecord2\n\n\n\n\n\nMacro2",
"F3",
"F4",
{
"x": 0.25
},
"F5",
"F6",
"F7",
"F8\n\n\n\n\n\n\n\n\nPrtScr",
{
"x": 2,
"c": "#ffffff",
"w": 1.125,
"h": 1.125
},
"Vol -/+\n\n\nRGB brightness\n\n\n\n\n\nScroll ↑ ↓"
],
[
{
"y": 0.25,
"c": "#cccccc"
},
"~\n`\n\n\n\n\n\n\n\nEsc",
"!\n1\n\n\n\n\n\n\n\nF1",
"@\n2\n\n\n\n\n\n\n\nF2",
"#\n3\n\n\n\n\n\n\n\nF3",
"$\n4\n\n\n\n\n\n\n\nF4",
"%\n5\n\n\n\n\n\n\n\nF5",
"^\n6\n\n\n\n\n\n\n\nF6",
"&\n7\n\n\n\n\n\n\n\nF7",
"*\n8\n\n\n\n\n\n\n\nF8",
"(\n9\n\n\n\n\n\n\n\nF9",
")\n0\n\n\n\n\n\n\n\nF10",
"_\n-\n\nRGB mode\n\n\n\n\n\nF11",
"+\n=\n\nRGB toggle\n\n\n\n\n\nF12"
],
[
"Tab",
"Q\n\n\n\n\n\n\n\n\nHome",
{
"fa": [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
]
},
"W\n\n\n\n\n\n\n\n\n↑",
{
"fa": [
0,
0,
0,
1,
0,
0,
0,
0,
0,
2
]
},
"E\n\n\n\n\n\n\n\n\nEnd",
"R\n\n\n\n\n\n\n\n\nPgUp",
"T",
"Y",
{
"fa": [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
]
},
"U\n\n\n\n\n\n\n\n\n_",
"I\n\n\n\n\n\n\n\n\n=",
"O\n\n\n\n\n\n\n\n\n[",
"P\n\n\n\n\n\n\n\n\n]",
"{\n[\n\nRGB speed -",
"}\n]\n\nRGB speed +"
],
[
"Esc",
"A\n\n\n\n\n\n\n\n\n←",
"S\n\n\n\n\n\n\n\n\n↓",
"D\n\n\n\n\n\n\n\n\n→",
{
"fa": [
0,
0,
0,
1,
0,
0,
0,
0,
0,
2
]
},
"F\n\n\n\n\n\n\n\n\nPgDn",
"G",
"H",
{
"fa": [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
]
},
"J\n\n\n\n\n\n\n\n\n-",
"K\n\n\n\n\n\n\n\n\n+",
"L\n\n\n\n\n\n\n\n\n{",
":\n;\n\n\n\n\n\n\n\n}",
"\"\n'",
"|\n\\"
],
[
"Shift",
{
"fa": [
0,
0,
0,
1,
0,
0,
0,
0,
0,
2
]
},
"Home\n\n\n\n\n\n\n\n\nCtrl ←",
{
"fa": [
0,
0,
0,
1,
0,
0,
0,
0,
0,
1
]
},
"Z\n\n\n\n\n\n\n\n\nSelect Word",
{
"fa": [
0,
0,
0,
1,
0,
0,
0,
0,
0,
2
]
},
"X\n\n\n\n\n\n\n\n\nCtrl →",
"C\n\n\n\n\n\n\n\n\nEnter",
"V",
"B",
"N",
"M",
"<\n,",
">\n.",
"?\n/\n\nClear eeprom",
"Shift\n\n\nReboot"
],
[
"Ctrl",
"End",
{
"x": 9,
"t": "#cc00ff\n\n\n#cc00ff\n\n\n\n\n\n#ff0000"
},
"Fn",
{
"t": "#000000\n\n\n#cc00ff\n\n\n\n\n\n#ff0000"
},
"Ctrl\n\n\nBoot loader"
],
[
{
"r": 6,
"rx": 1.5,
"ry": 16,
"y": -10.75,
"x": -0.5
},
"Super"
],
[
{
"r": 12,
"y": -1,
"x": -0.5,
"t": "#ff0000\n\n\n#cc00ff\n\n\n\n\n\n#ff0000"
},
"Move"
],
[
{
"r": 18,
"y": -1,
"x": -0.5,
"t": "#000000\n\n\n#cc00ff\n\n\n\n\n\n#ff0000"
},
"Bksp"
],
[
{
"r": 24,
"y": -1,
"x": -0.5,
"fa": [
2,
0,
0,
1,
0,
0,
0,
0,
0,
2
]
},
"Space"
],
[
{
"r": -24,
"rx": 11.5,
"y": -10.75,
"x": -0.5,
"fa": [
0,
0,
0,
1,
0,
0,
0,
0,
0,
2
]
},
"Bksp"
],
[
{
"r": -18,
"y": -1,
"x": -0.5
},
"Enter"
],
[
{
"r": -12,
"y": -1,
"x": -0.5
},
"AltGr"
],
[
{
"r": -6,
"y": -1,
"x": -0.5
},
"Del"
]
]

View File

@ -1,328 +0,0 @@
[
[
{
"x": 1,
"t": "#000000\n\n\n\n\n\n\n\n\n#ff0000",
"fa": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
2
]
},
"!\n1\n\n\n\n\n\n\n\nF1",
"@\n2\n\n\n\n\n\n\n\nF2",
"#\n3\n\n\n\n\n\n\n\nF3",
{
"x": 6
},
"*\n8\n\n\n\n\n\n\n\nF8",
"(\n9\n\n\n\n\n\n\n\nF9",
")\n0\n\n\n\n\n\n\n\nF10"
],
[
{
"y": -0.75
},
"~\n`\n\n\n\n\n\n\n\nEsc",
{
"x": 3
},
"$\n4\n\n\n\n\n\n\n\nF4",
{
"x": 4
},
"&\n7\n\n\n\n\n\n\n\nF7",
{
"x": 3
},
"_\n-\n\n\n\n\n\n\n\nF11"
],
[
{
"y": -0.75,
"x": 5
},
"%\n5\n\n\n\n\n\n\n\nF5",
{
"x": 2
},
"^\n6\n\n\n\n\n\n\n\nF6"
],
[
{
"y": -0.5,
"x": 1
},
"Q\n\n\n\n\n\n\n\n\nM left",
"W\n\n\n\n\n\n\n\n\nM↑",
"E\n\n\n\n\n\n\n\n\nM right",
{
"x": 6
},
"I\n\n\n\n\n\n\n\n\n↑",
{
"t": "#000000\n\n\n#0094ff\n\n\n\n\n\n#ff0000"
},
"O\n\n\n[\n\n\n\n\n\nEnd",
{
"t": "#000000\n\n\n#0094ff"
},
"P\n\n\n]"
],
[
{
"y": -0.75,
"t": "#000000"
},
"Tab",
{
"x": 3
},
"R",
{
"x": 4,
"t": "#000000\n\n\n\n\n\n\n\n\n#ff0000"
},
"U\n\n\n\n\n\n\n\n\nHome",
{
"x": 3
},
"+\n=\n\n\n\n\n\n\n\nF12"
],
[
{
"y": -0.75,
"x": 5,
"t": "#000000"
},
"T",
{
"x": 2,
"t": "#000000\n\n\n\n\n\n\n\n\n#ff0000"
},
"Y\n\n\n\n\n\n\n\n\nPgUp"
],
[
{
"y": -0.5,
"x": 1
},
"A\n\n\n\n\n\n\n\n\nM←",
"S\n\n\n\n\n\n\n\n\nM↓",
"D\n\n\n\n\n\n\n\n\nM→",
{
"x": 6,
"f": 3
},
"K\n\n\n\n\n\n\n\n\n↓",
{
"t": "#000000\n\n\n#0094ff\n\n\n\n\n\n#ff0000",
"f": 3
},
"L\n\n\n{\n\n\n\n\n\n→",
{
"t": "#000000\n\n\n#0094ff"
},
":\n;\n\n}"
],
[
{
"y": -0.75,
"t": "#000000"
},
"Esc (?)",
{
"x": 3
},
"F",
{
"x": 4,
"t": "#000000\n\n\n\n\n\n\n\n\n#ff0000",
"f": 3
},
"J\n\n\n\n\n\n\n\n\n←",
{
"x": 3,
"t": "#000000\n\n\n#0094ff"
},
"\"\n'\n\n|"
],
[
{
"y": -0.75,
"x": 5,
"t": "#000000"
},
"G",
{
"x": 2,
"t": "#000000\n\n\n\n\n\n\n\n\n#ff0000",
"f": 3
},
"H\n\n\n\n\n\n\n\n\nPgDn"
],
[
{
"y": -0.5,
"x": 1,
"f": 3
},
"Back\n\n\n\n\n\n\n\n\nDel",
{
"t": "#000000"
},
"Z",
"X",
{
"x": 6
},
"M",
"<\n,",
">\n."
],
[
{
"y": -0.75,
"t": "#002aff\n\n\n\n\n\n\n\n\n#ff0000",
"fa": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1
]
},
"Shift\n\n\n\n\n\n\n\n\nCaps-Word",
{
"x": 3,
"t": "#000000"
},
"C",
{
"x": 4
},
"N",
{
"x": 3,
"t": "#000000\n\n\n#0094ff"
},
"?\n/\n\n\\"
],
[
{
"y": -0.75,
"x": 5,
"t": "#000000"
},
"V",
{
"x": 2
},
"B"
],
[
{
"y": -0.5,
"x": 1,
"t": "#0094ff"
},
"Raise",
{
"x": 10,
"t": "#cc00ff"
},
"Fn / kbdctl"
],
[
{
"y": -0.75,
"t": "#002aff"
},
"Ctrl",
{
"x": 12,
"t": "#000000",
"a": 7
},
"(?)"
],
[
{
"y": -0.75,
"x": 2.5,
"t": "#002aff",
"a": 4
},
"Super",
{
"x": 7,
"t": "#009e26"
},
"Leader ?"
],
[
{
"y": -0.75,
"x": 3.5,
"t": "#ff0000"
},
"Move",
{
"x": 5,
"t": "#0094ff"
},
"1shot Raise"
],
[
{
"y": -0.75,
"x": 4.5,
"t": "#002aff"
},
"Alt",
{
"x": 3
},
"AltGr"
],
[
{
"y": -0.75,
"x": 5.5,
"t": "#000000",
"fa": [
2
]
},
"Space",
{
"x": 1,
"t": "#000000\n\n\n\n\n\n\n\n\n#ff0000",
"fa": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
2
]
},
"Enter\n\n\n\n\n\n\n\n\nIns (?)"
]
]

View File

@ -0,0 +1,3 @@
# eepyBoard v1.0 / rev1
This is the firmware for hardware revision 1 of the eepyBoard (v1.0).

View File

@ -0,0 +1,7 @@
// Copyright 2024 binaryDiv (@binaryDiv)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
// Lock one-shot keys when tapping them twice
#define ONESHOT_TAP_TOGGLE 2

View File

@ -0,0 +1,213 @@
{
"keyboard_name": "eepyBoard v1.0",
"maintainer": "binaryDiv",
"manufacturer": "binaryDiv",
"url": "https://git.0xbd.space/binaryDiv/eepyBoard",
"processor": "RP2040",
"bootloader": "rp2040",
"usb": {
"device_version": "1.0.0",
"vid": "0x1337",
"pid": "0xBD32"
},
"features": {
"bootmagic": true,
"command": false,
"console": true,
"extrakey": true,
"mousekey": true,
"nkro": true,
"rgb_matrix": true
},
"diode_direction": "COL2ROW",
"matrix_pins": {
"cols": ["GP8", "GP7", "GP6", "GP5", "GP4", "GP3", "GP2", "GP1", "GP0", "GP25", "GP24", "GP23", "GP22"],
"rows": ["GP12", "GP13", "GP14", "GP15", "GP16", "GP17"]
},
"encoder": {
"rotary": [
{
"pin_a": "GP10",
"pin_b": "GP11",
"resolution": 4
}
]
},
"layouts": {
"LAYOUT_ortho_6x13": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 1, "y": 0},
{"matrix": [0, 2], "x": 2, "y": 0},
{"matrix": [0, 3], "x": 3, "y": 0},
{"matrix": [0, 4], "x": 4, "y": 0},
{"matrix": [0, 5], "x": 5, "y": 0},
{"matrix": [0, 6], "x": 6, "y": 0},
{"matrix": [0, 7], "x": 7, "y": 0},
{"matrix": [0, 8], "x": 8, "y": 0},
{"matrix": [0, 9], "x": 9, "y": 0},
{"matrix": [0, 10], "x": 10, "y": 0},
{"matrix": [0, 11], "x": 11, "y": 0},
{"matrix": [0, 12], "x": 12, "y": 0},
{"matrix": [1, 0], "x": 0, "y": 1},
{"matrix": [1, 1], "x": 1, "y": 1},
{"matrix": [1, 2], "x": 2, "y": 1},
{"matrix": [1, 3], "x": 3, "y": 1},
{"matrix": [1, 4], "x": 4, "y": 1},
{"matrix": [1, 5], "x": 5, "y": 1},
{"matrix": [1, 6], "x": 6, "y": 1},
{"matrix": [1, 7], "x": 7, "y": 1},
{"matrix": [1, 8], "x": 8, "y": 1},
{"matrix": [1, 9], "x": 9, "y": 1},
{"matrix": [1, 10], "x": 10, "y": 1},
{"matrix": [1, 11], "x": 11, "y": 1},
{"matrix": [1, 12], "x": 12, "y": 1},
{"matrix": [2, 0], "x": 0, "y": 2},
{"matrix": [2, 1], "x": 1, "y": 2},
{"matrix": [2, 2], "x": 2, "y": 2},
{"matrix": [2, 3], "x": 3, "y": 2},
{"matrix": [2, 4], "x": 4, "y": 2},
{"matrix": [2, 5], "x": 5, "y": 2},
{"matrix": [2, 6], "x": 6, "y": 2},
{"matrix": [2, 7], "x": 7, "y": 2},
{"matrix": [2, 8], "x": 8, "y": 2},
{"matrix": [2, 9], "x": 9, "y": 2},
{"matrix": [2, 10], "x": 10, "y": 2},
{"matrix": [2, 11], "x": 11, "y": 2},
{"matrix": [2, 12], "x": 12, "y": 2},
{"matrix": [3, 0], "x": 0, "y": 3},
{"matrix": [3, 1], "x": 1, "y": 3},
{"matrix": [3, 2], "x": 2, "y": 3},
{"matrix": [3, 3], "x": 3, "y": 3},
{"matrix": [3, 4], "x": 4, "y": 3},
{"matrix": [3, 5], "x": 5, "y": 3},
{"matrix": [3, 6], "x": 6, "y": 3},
{"matrix": [3, 7], "x": 7, "y": 3},
{"matrix": [3, 8], "x": 8, "y": 3},
{"matrix": [3, 9], "x": 9, "y": 3},
{"matrix": [3, 10], "x": 10, "y": 3},
{"matrix": [3, 11], "x": 11, "y": 3},
{"matrix": [3, 12], "x": 12, "y": 3},
{"matrix": [4, 0], "x": 0, "y": 4},
{"matrix": [4, 1], "x": 1, "y": 4},
{"matrix": [4, 2], "x": 2, "y": 4},
{"matrix": [4, 3], "x": 3, "y": 4},
{"matrix": [4, 4], "x": 4, "y": 4},
{"matrix": [4, 5], "x": 5, "y": 4},
{"matrix": [4, 6], "x": 6, "y": 4},
{"matrix": [4, 7], "x": 7, "y": 4},
{"matrix": [4, 8], "x": 8, "y": 4},
{"matrix": [4, 9], "x": 9, "y": 4},
{"matrix": [4, 10], "x": 10, "y": 4},
{"matrix": [4, 11], "x": 11, "y": 4},
{"matrix": [4, 12], "x": 12, "y": 4},
{"matrix": [5, 0], "x": 0, "y": 5},
{"matrix": [5, 1], "x": 1, "y": 5},
{"matrix": [5, 2], "x": 2, "y": 5},
{"matrix": [5, 3], "x": 3, "y": 5},
{"matrix": [5, 4], "x": 4, "y": 5},
{"matrix": [5, 5], "x": 5, "y": 5},
{"matrix": [5, 6], "x": 6, "y": 5},
{"matrix": [5, 7], "x": 7, "y": 5},
{"matrix": [5, 8], "x": 8, "y": 5},
{"matrix": [5, 9], "x": 9, "y": 5},
{"matrix": [5, 10], "x": 10, "y": 5},
{"matrix": [5, 11], "x": 11, "y": 5},
{"matrix": [5, 12], "x": 12, "y": 5}
]
}
},
"rgb_matrix": {
"driver": "ws2812",
"default": {
"animation": "cycle_pinwheel",
"speed": 32
},
"animations": {
"cycle_pinwheel": true,
"typing_heatmap": true
},
"max_brightness": 127,
"sleep": true,
"center_point": [6, 3],
"layout": [
{"x": 10, "y": 0, "flags": 8},
{"x": 8, "y": 0, "matrix": [0, 8], "flags": 4},
{"x": 7, "y": 0, "matrix": [0, 7], "flags": 4},
{"x": 6, "y": 0, "matrix": [0, 6], "flags": 4},
{"x": 5, "y": 0, "matrix": [0, 5], "flags": 4},
{"x": 4, "y": 0, "matrix": [0, 4], "flags": 4},
{"x": 3, "y": 0, "matrix": [0, 3], "flags": 4},
{"x": 2, "y": 0, "matrix": [0, 2], "flags": 4},
{"x": 1, "y": 0, "matrix": [0, 1], "flags": 4},
{"x": 0, "y": 0, "matrix": [0, 0], "flags": 4},
{"x": 0, "y": 1, "matrix": [1, 0], "flags": 4},
{"x": 1, "y": 1, "matrix": [1, 1], "flags": 4},
{"x": 2, "y": 1, "matrix": [1, 2], "flags": 4},
{"x": 3, "y": 1, "matrix": [1, 3], "flags": 4},
{"x": 4, "y": 1, "matrix": [1, 4], "flags": 4},
{"x": 5, "y": 1, "matrix": [1, 5], "flags": 4},
{"x": 6, "y": 1, "matrix": [1, 6], "flags": 4},
{"x": 7, "y": 1, "matrix": [1, 7], "flags": 4},
{"x": 8, "y": 1, "matrix": [1, 8], "flags": 4},
{"x": 9, "y": 1, "matrix": [1, 9], "flags": 4},
{"x": 10, "y": 1, "matrix": [1, 10], "flags": 4},
{"x": 11, "y": 1, "matrix": [1, 11], "flags": 4},
{"x": 12, "y": 1, "matrix": [1, 12], "flags": 4},
{"x": 12, "y": 2, "matrix": [2, 12], "flags": 4},
{"x": 11, "y": 2, "matrix": [2, 11], "flags": 4},
{"x": 10, "y": 2, "matrix": [2, 10], "flags": 4},
{"x": 9, "y": 2, "matrix": [2, 9], "flags": 4},
{"x": 8, "y": 2, "matrix": [2, 8], "flags": 4},
{"x": 7, "y": 2, "matrix": [2, 7], "flags": 4},
{"x": 6, "y": 2, "matrix": [2, 6], "flags": 4},
{"x": 5, "y": 2, "matrix": [2, 5], "flags": 4},
{"x": 4, "y": 2, "matrix": [2, 4], "flags": 4},
{"x": 3, "y": 2, "matrix": [2, 3], "flags": 4},
{"x": 2, "y": 2, "matrix": [2, 2], "flags": 4},
{"x": 1, "y": 2, "matrix": [2, 1], "flags": 4},
{"x": 0, "y": 2, "matrix": [2, 0], "flags": 4},
{"x": 0, "y": 3, "matrix": [3, 0], "flags": 4},
{"x": 1, "y": 3, "matrix": [3, 1], "flags": 4},
{"x": 2, "y": 3, "matrix": [3, 2], "flags": 4},
{"x": 3, "y": 3, "matrix": [3, 3], "flags": 4},
{"x": 4, "y": 3, "matrix": [3, 4], "flags": 4},
{"x": 5, "y": 3, "matrix": [3, 5], "flags": 4},
{"x": 6, "y": 3, "matrix": [3, 6], "flags": 4},
{"x": 7, "y": 3, "matrix": [3, 7], "flags": 4},
{"x": 8, "y": 3, "matrix": [3, 8], "flags": 4},
{"x": 9, "y": 3, "matrix": [3, 9], "flags": 4},
{"x": 10, "y": 3, "matrix": [3, 10], "flags": 4},
{"x": 11, "y": 3, "matrix": [3, 11], "flags": 4},
{"x": 12, "y": 3, "matrix": [3, 12], "flags": 4},
{"x": 12, "y": 4, "matrix": [4, 12], "flags": 4},
{"x": 11, "y": 4, "matrix": [4, 11], "flags": 4},
{"x": 10, "y": 4, "matrix": [4, 10], "flags": 4},
{"x": 9, "y": 4, "matrix": [4, 9], "flags": 4},
{"x": 8, "y": 4, "matrix": [4, 8], "flags": 4},
{"x": 7, "y": 4, "matrix": [4, 7], "flags": 4},
{"x": 6, "y": 4, "matrix": [4, 6], "flags": 4},
{"x": 5, "y": 4, "matrix": [4, 5], "flags": 4},
{"x": 4, "y": 4, "matrix": [4, 4], "flags": 4},
{"x": 3, "y": 4, "matrix": [4, 3], "flags": 4},
{"x": 2, "y": 4, "matrix": [4, 2], "flags": 4},
{"x": 1, "y": 4, "matrix": [4, 1], "flags": 4},
{"x": 0, "y": 4, "matrix": [4, 0], "flags": 4},
{"x": 0, "y": 5, "matrix": [5, 0], "flags": 4},
{"x": 1, "y": 5, "matrix": [5, 1], "flags": 4},
{"x": 2, "y": 5, "matrix": [5, 2], "flags": 4},
{"x": 3, "y": 5, "matrix": [5, 3], "flags": 4},
{"x": 4, "y": 5, "matrix": [5, 4], "flags": 4},
{"x": 5, "y": 5, "matrix": [5, 5], "flags": 4},
{"x": 7, "y": 5, "matrix": [5, 7], "flags": 4},
{"x": 8, "y": 5, "matrix": [5, 8], "flags": 4},
{"x": 9, "y": 5, "matrix": [5, 9], "flags": 4},
{"x": 10, "y": 5, "matrix": [5, 10], "flags": 4},
{"x": 11, "y": 5, "matrix": [5, 11], "flags": 4},
{"x": 12, "y": 5, "matrix": [5, 12], "flags": 4}
]
},
"ws2812": {
"pin": "GP9"
}
}

View File

@ -0,0 +1,85 @@
// Copyright 2024 binaryDiv (@binaryDiv)
// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H
// Define layer names for better readability
enum layer_names {
// Base layer
L_BASE,
// "Code" key: Moving the cursor around via WASD, F-keys on number keys, etc.
L_CODE,
// Fn / keyboard control layer: Used for keyboard configuration
L_FN,
};
// Custom keycodes
enum custom_keycodes {
// Macro to select the current word (Ctrl-Left, Shift-Ctrl-Right)
MACRO_SELECT_WORD = SAFE_RANGE,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Base layer
[L_BASE] = LAYOUT_ortho_6x13(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, _______, KC_KB_MUTE,
KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LEFT_BRACKET, KC_RIGHT_BRACKET,
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SEMICOLON, KC_QUOTE, KC_BACKSLASH,
KC_LEFT_SHIFT, KC_HOME, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RIGHT_SHIFT,
KC_LEFT_CTRL, KC_END, KC_LGUI, KC_LEFT_ALT, OSL(L_CODE), KC_SPACE, _______, KC_BACKSPACE, KC_ENTER, OSM(MOD_RALT), KC_DELETE, MO(L_FN), KC_RIGHT_CTRL
),
// "Code" key layer
[L_CODE] = LAYOUT_ortho_6x13(
_______, DM_PLY1, DM_PLY2, _______, _______, _______, _______, _______, KC_PRINT_SCREEN, _______, _______, _______, _______,
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
_______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, KC_UNDERSCORE, KC_EQUAL, KC_LEFT_BRACKET, KC_RIGHT_BRACKET, _______, _______,
_______, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, _______, _______, KC_MINUS, KC_PLUS, KC_LEFT_CURLY_BRACE, KC_RIGHT_CURLY_BRACE, _______, _______,
_______, LCTL(KC_LEFT), MACRO_SELECT_WORD, LCTL(KC_RIGHT), KC_ENTER, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
// "Fn" key layer
[L_FN] = LAYOUT_ortho_6x13(
DM_RSTP, DM_REC1, DM_REC2, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, OS_TOGG, _______, RGB_MOD, RGB_TOG,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_CLEAR_EEPROM, QK_REBOOT,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOTLOADER
)
};
// Define mapping for rotary encoder
#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
// Base layer: Volume control
[L_BASE] = {
ENCODER_CCW_CW(KC_KB_VOLUME_DOWN, KC_KB_VOLUME_UP)
},
// Code layer: Scroll wheel
[L_CODE] = {
ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN)
},
// Fn layer: RGB LED brightness control
[L_FN] = {
ENCODER_CCW_CW(RGB_VAD, RGB_VAI)
}
};
#endif
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case MACRO_SELECT_WORD:
// Run macro when keycode is pressed
if (record->event.pressed) {
// Select word
SEND_STRING(SS_LCTL(SS_TAP(X_LEFT)) SS_LSFT(SS_LCTL(SS_TAP(X_RIGHT))));
}
break;
}
return true;
}

View File

@ -0,0 +1,9 @@
# Enable support for rotary encoder
ENCODER_ENABLE = yes
ENCODER_MAP_ENABLE = yes
# Use RP2040-specific driver for WS2812 (PIO-based)
WS2812_DRIVER = vendor
# Enable support for dynamic macros
DYNAMIC_MACRO_ENABLE = yes