Keyboard shortcut cheat sheets rendered as printable PDFs using Typst.
- Python 3.13+
- Typst CLI — install via
brew install typst,cargo install typst-cli, or your package manager - uv (recommended) for running the CLI
Compile all cheat sheets in data/ at once:
uv run keyatlasCompile a single file:
uv run keyatlas data/ghostty.yamlCompile specific files with shell globs:
uv run keyatlas data/vscode-*.yamlCustom output path (single file only):
uv run keyatlas data/ghostty.yaml -o ~/Desktop/ghostty.pdfWrite all PDFs to a specific directory:
uv run keyatlas -d ~/Desktop/cheatsheets| Flag | Short | Description | Default |
|---|---|---|---|
--paper |
-p |
Paper size (any Typst paper size string) | us-letter |
--color |
-c |
Accent color as hex | #4a90d9 |
--font-scale |
-s |
Font size multiplier | 1.0 |
--orientation |
Page orientation (landscape or portrait) |
landscape |
|
--columns |
-n |
Number of layout columns | 3 |
--output-dir |
-d |
Output directory for PDFs | current directory |
--platform |
Target platform: mac, windows, both |
mac |
|
--output |
-o |
Output path (single file only) | {stem}.pdf |
--output and --output-dir are mutually exclusive.
# Custom accent color
uv run keyatlas data/ghostty.yaml -c "#e63946" -o ~/Desktop/ghostty-red.pdf
# Smaller font for dense sheets
uv run keyatlas data/ghostty.yaml -s 0.85 -o ~/Desktop/ghostty-small.pdf
# Portrait A4 layout
uv run keyatlas data/ghostty.yaml --orientation portrait -p a4 -o ~/Desktop/ghostty-a4.pdf
# Two-column layout
uv run keyatlas data/ghostty.yaml -n 2 -o ~/Desktop/ghostty-2col.pdf
# Generate Windows key-label variants
uv run keyatlas --platform windows -d ~/Desktop/win
# Generate both Mac and Windows variants in one run
uv run keyatlas --platform both -d ~/Desktop/bothThe --platform flag controls which key labels appear in the output:
| Value | Behaviour |
|---|---|
mac (default) |
Uses the key symbols as written in the YAML file. |
windows |
Applies automatic Mac→Windows key mapping (e.g. ⌘ → Ctrl, ⌥ → Alt). If a win_keys field is present on an entry it is used as-is, bypassing the auto-mapping. |
both |
Produces two PDFs per input file — one for each platform — named {stem}-mac.pdf and {stem}-windows.pdf. |
| Mac symbol | Windows label |
|---|---|
⌘ Command |
Ctrl |
⌥ Option |
Alt |
⇧ Shift |
Shift |
⌃ Control |
Ctrl |
↵ Return |
Enter |
⌫ Delete |
Backspace |
⎋ Escape |
Esc |
Each file in data/ defines one cheat sheet. All fields except app and sections are optional and can be overridden at compile time with CLI flags.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
app |
string | yes | — | Application name shown in the title |
subtitle |
string | no | — | Subtitle below the title |
paper |
string | no | us-letter |
Paper size (any Typst paper size string) |
columns |
integer (1–6) | no | 3 |
Number of layout columns |
color |
string | no | #4a90d9 |
Accent color as a #rrggbb hex string |
font_scale |
number (0.5–2.0) | no | 1.0 |
Font size multiplier |
orientation |
landscape or portrait |
no | landscape |
Page orientation |
sections |
list | yes | — | List of sections (see below) |
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | yes | Section heading |
entries |
list | yes | List of keybinding entries |
| Field | Type | Required | Description |
|---|---|---|---|
keys |
list of strings or list of lists | yes | Primary key combination (Mac). See below for chord syntax. |
win_keys |
list of strings or list of lists | no | Windows-specific override for keys. Bypasses auto-mapping. |
alt_keys |
list of strings | no | Alternate key combination shown alongside keys |
range |
list of strings | no | End of a numeric range (e.g. ["8"] renders 1–8) |
action |
string | yes | Human-readable action description |
A simple combination is a flat array of strings:
keys: ["⌘", "N"]A chord (two key combinations pressed in sequence) uses an array of arrays:
keys: [["⌘", "K"], ["⌘", "S"]]app: My App
subtitle: macOS shortcuts
columns: 2
color: "#e63946"
font_scale: 0.9
orientation: portrait
sections:
- name: General
entries:
- keys: ["⌘", "N"]
action: New file
- keys: ["⌘", "⌥", "N"]
win_keys: ["Ctrl", "Alt", "N"]
action: New window
- keys: [["⌘", "K"], ["⌘", "S"]]
action: Open Keyboard Shortcuts
- keys: ["⌘", "1"]
action: "Go to tab 1–8"
range: ["8"]
- keys: ["⌘", "↵"]
alt_keys: ["⌃", "F"]
action: Toggle fullscreenA JSON Schema file is provided at schema/keyatlas.schema.json (draft 2020-12). It describes all valid fields, types, and constraints for the YAML data files.
If your editor supports the yaml-language-server (e.g. VS Code with the YAML extension), the bundled data files already include the schema association comment and will validate automatically:
# yaml-language-server: $schema=../schema/keyatlas.schema.json
app: My App
...Add the same comment to any new files you create in data/ to get inline validation and autocompletion.
- Create
data/<app>.yamlwith the schema comment and keybinding data. - Run
uv run keyatlas data/<app>.yamlto generate the PDF.
keyatlas/
├── data/ # Keybinding data (YAML, one file per app)
│ ├── ghostty.yaml
│ ├── vscode-general.yaml
│ ├── vscode-editing.yaml
│ └── vscode-navigation.yaml
├── schema/
│ └── keyatlas.schema.json # JSON Schema for YAML data files
├── src/keyatlas/ # Python CLI package
│ ├── __init__.py
│ └── cli.py # Entry point: compiles YAML → PDF via Typst
├── template/
│ └── cheatsheet.typ # Reusable Typst template
└── pyproject.toml