Generate PDF visualizations of Glove80 keyboard layers from ZMK keymap files
Project description
Glove80 Keymap Visualizer
Generate beautiful PDF visualizations of your Glove80 keyboard layers from ZMK keymap files.
What It Does
This tool takes your ZMK .keymap file (exported from the MoErgo Glove80 Layout Editor) and generates a PDF document with a visual diagram for each layer—similar to sunaku's layer diagrams.
Example Output
With --color flag (semantic coloring by key category):
Plain output (no color coding):
Getting Started
Step 1: Install System Dependencies
macOS:
brew install cairo
Ubuntu/Debian:
sudo apt-get install libcairo2-dev
Windows: See CairoSVG installation docs for Windows instructions.
Step 2: Install the Tool
Option A: Install from PyPI (recommended)
pip install glove80-keymap-visualizer
Option B: Install from source
git clone https://github.com/dsifry/glove80-keymap-visualizer.git
cd glove80-keymap-visualizer
pip install .
Step 3: Export Your Keymap
- Go to my.glove80.com
- Load your layout
- Click Export → Download ZMK Keymap
- Save the
.keymapfile
Step 4: Generate Your PDF
# Basic usage - generates a PDF with all layers
glove80-viz your-keymap.keymap -o my-layers.pdf
# With color coding (recommended!)
glove80-viz your-keymap.keymap -o my-layers.pdf --color
That's it! Open my-layers.pdf to see your keyboard layout.
Common Options
# Color-coded keys by category (modifiers, navigation, etc.)
glove80-viz keymap.keymap -o output.pdf --color
# Color-coded without the legend
glove80-viz keymap.keymap -o output.pdf --color --no-legend
# Windows modifier symbols (Win, Ctrl, Alt, Shift) instead of Mac symbols
glove80-viz keymap.keymap -o output.pdf --windows
# Show what keys do on transparent layers (instead of "trans")
glove80-viz keymap.keymap -o output.pdf --resolve-trans
# Generate only specific layers
glove80-viz keymap.keymap -o output.pdf --layers Base,Symbol,Cursor
# Generate SVG files instead of PDF
glove80-viz keymap.keymap -o ./svg-folder --format svg
# List all available layers in your keymap
glove80-viz keymap.keymap --list-layers
Features
- OS-specific modifier symbols — Mac (⌘⌥⌃⇧), Windows (Win+Ctrl+Alt+Shift), or Linux (Super+Ctrl+Alt+Shift)
- Semantic coloring — Color-code keys by category: modifiers, navigation, numbers, symbols, media, layers, system
- Color legend — Shows what each color means (can be hidden with
--no-legend) - Held key indicators — Shows which key you hold to activate each layer
- MEH/HYPER expansion —
MEH(K)displays as⌃⌥⇧Kon Mac - Transparent key resolution — Optionally show inherited keys instead of "trans" markers
- Table of contents — PDF includes clickable TOC for easy navigation
- Layer filtering — Generate only the layers you want
All CLI Options
| Option | Description |
|---|---|
-o, --output |
Output file (PDF) or directory (SVG) |
--format |
Output format: pdf (default) or svg |
--layers |
Comma-separated list of layers to include |
--exclude-layers |
Comma-separated list of layers to exclude |
--list-layers |
List available layers and exit |
--config |
Path to YAML configuration file |
--mac |
Use Mac modifier symbols (⌘⌥⌃⇧) — default |
--windows |
Use Windows modifier symbols |
--linux |
Use Linux modifier symbols |
--color |
Apply semantic colors to keys |
--no-legend |
Hide color legend (use with --color) |
--resolve-trans |
Show inherited keys instead of "trans" |
--base-layer |
Base layer for --resolve-trans (default: first layer) |
--no-toc |
Disable table of contents in PDF |
--continue-on-error |
Continue if a layer fails to render |
-v, --verbose |
Show detailed output |
-q, --quiet |
Suppress all output except errors |
Color Scheme
When using --color, keys are colored by category using an Everforest-inspired palette:
| Category | Color | Example Keys |
|---|---|---|
| Modifiers | Teal | ⌘, ⌥, ⌃, ⇧, Shift, Ctrl, Alt |
| Navigation | Green | ←, →, ↑, ↓, Home, End, PgUp, PgDn |
| Numbers | Yellow | 0-9, F1-F12 |
| Symbols | Orange | !@#$%^&*() etc. |
| Media | Light Green | ⏯, ⏭, 🔊, 🔇, brightness |
| Layer | Purple | Layer activators (held keys) |
| System | Red | Reset, Boot, Bluetooth keys |
| Mouse | Teal | Mouse movement and clicks |
| Transparent | Gray | Transparent/pass-through keys |
Configuration File
For persistent settings, create a YAML config file:
# my-config.yaml
os_style: mac # "mac", "windows", or "linux"
show_colors: true
show_legend: true
resolve_trans: false
include_toc: true
page_size: letter # or "a4"
orientation: landscape
Then use it:
glove80-viz keymap.keymap -o output.pdf --config my-config.yaml
Development
# Install with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Run tests with coverage
pytest --cov
# Format code
ruff format .
# Lint
ruff check .
How It Works
- Parse — Uses keymap-drawer to parse ZMK keymap files
- Extract — Extracts layer info, key bindings, hold behaviors, and layer activators
- Generate SVG — Creates SVG diagrams with keymap-drawer's layout engine
- Convert to PDF — Combines SVGs into a PDF with TOC using CairoSVG and pikepdf
Credits
- keymap-drawer — ZMK keymap parsing and SVG generation
- sunaku's Glove80 keymaps — Inspiration for visualization format
- MoErgo Glove80 — The keyboard this tool is built for
- Everforest — Color palette inspiration
License
MIT License — see LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file glove80_keymap_visualizer-0.2.0.tar.gz.
File metadata
- Download URL: glove80_keymap_visualizer-0.2.0.tar.gz
- Upload date:
- Size: 425.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e44b919c26f2c684d5b486c576635d2f3a99efb56757d1b4728712cdb25e60be
|
|
| MD5 |
ea3f4d35cd0291fee0208a8216bda09c
|
|
| BLAKE2b-256 |
8bcbc3d89ee1b002bd77e8d78ef5785ee68f56f180181341b66149404995799e
|
Provenance
The following attestation bundles were made for glove80_keymap_visualizer-0.2.0.tar.gz:
Publisher:
publish.yml on dsifry/glove80-keymap-visualizer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
glove80_keymap_visualizer-0.2.0.tar.gz -
Subject digest:
e44b919c26f2c684d5b486c576635d2f3a99efb56757d1b4728712cdb25e60be - Sigstore transparency entry: 737094216
- Sigstore integration time:
-
Permalink:
dsifry/glove80-keymap-visualizer@7f5596b2d0e8cfd872c43baaa5d1f28992cae8a6 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/dsifry
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7f5596b2d0e8cfd872c43baaa5d1f28992cae8a6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file glove80_keymap_visualizer-0.2.0-py3-none-any.whl.
File metadata
- Download URL: glove80_keymap_visualizer-0.2.0-py3-none-any.whl
- Upload date:
- Size: 34.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5114f4522f084fadc6fba01e9aca25a66822d327862af2af85b185d2ce4a21f
|
|
| MD5 |
ab40fd0923e97369ed2f57bb3aa13d5d
|
|
| BLAKE2b-256 |
be5b21ffd602d40f1603955f2ac9c9d768f774ad44fae2e6788c52a4f47319c2
|
Provenance
The following attestation bundles were made for glove80_keymap_visualizer-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on dsifry/glove80-keymap-visualizer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
glove80_keymap_visualizer-0.2.0-py3-none-any.whl -
Subject digest:
f5114f4522f084fadc6fba01e9aca25a66822d327862af2af85b185d2ce4a21f - Sigstore transparency entry: 737094237
- Sigstore integration time:
-
Permalink:
dsifry/glove80-keymap-visualizer@7f5596b2d0e8cfd872c43baaa5d1f28992cae8a6 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/dsifry
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7f5596b2d0e8cfd872c43baaa5d1f28992cae8a6 -
Trigger Event:
release
-
Statement type: