- Use
.yaml
extension - Required top-level keys:
title
,layout
,shortcuts
- Optional top-level keys:
RenderKeys
,AllowText
layout
specifieskeyboard
(US, UK, ...) andsystem
(Darwin, Windows, Linux)shortcuts
organized by categories- Use all caps for key names (CMD, CTRL, SHIFT, ALT)
- Use
+
to combine keys - For arrow keys, use Up, Down, Left, Right
- Your YAML will be validated, linted, and automatically fixed if possible
Each cheat sheet should be a single YAML file with the .yaml
extension, located in the cheatsheets
directory of the project.
The YAML file must contain the following top-level keys:
title
: A string representing the title of the cheat sheet.layout
: An object containing keyboard and system information.shortcuts
: An object containing categories and their associated shortcuts.
Optionally, the following keys are also supported:
RenderKeys
:true
/false
(default: true)AllowText
:true
/false
(default: false)
title: ""
RenderKeys: true # defaults to true
AllowText: false # defaults to false - requires RenderKeys: false
layout:
keyboard: US
system: Darwin
shortcuts:
- The
title
should be a descriptive string enclosed in quotes.
The layout
object must contain two keys:
keyboard
: Specifies the keyboard layout.system
: Specifies the operating system.
Valid values for keyboard
are:
US
(United States)UK
(United Kingdom)DE
(German)FR
(French)ES
(Spanish)
Valid values for system
are:
Darwin
(for macOS)Windows
Linux
The shortcuts
object contains categories as keys, with each category containing a set of shortcuts.
- Use quotation marks for category names containing spaces.
- Use title case for category names.
Each shortcut is represented by a key-value pair:
- The key is the shortcut combination, enclosed in quotes.
- The value is an object with a
description
key.
- Use all caps for key names (e.g.,
CMD
,CTRL
,SHIFT
,ALT
). - Use
+
to combine keys in a shortcut. - For special keys, use their full names:
Space
,Tab
,Enter
,Backspace
,Delete
,Esc
. - For arrow keys, use
Up
,Down
,Left
,Right
. - For function keys, use
F1
,F2
, etc.
- macOS (Darwin):
CMD
for Command key (⌘)CTRL
for Control key (⌃)ALT
for Option key (⌥)SHIFT
for Shift key
- Windows:
Windows
for Windows keyCTRL
for Control keyALT
for Alt keySHIFT
for Shift key
shortcuts:
"General":
"CMD+C":
description: "Copy selected item"
"CMD+V":
description: "Paste copied or cut item"
"Text Editing":
"CMD+B":
description: "Bold selected text"
"CMD+Right":
description: "Move cursor to end of current line"
When you submit your YAML file, it will go through a validation, linting, and fixing process.
The system checks for:
- Required top-level keys (
title
,layout
,shortcuts
) - Correct data types for each key
- Valid values for
keyboard
andsystem
in thelayout
section - Proper structure of the
shortcuts
section
The linting process checks for:
- Lines longer than 100 characters
- Inconsistent indentation (should be multiples of 2 spaces)
- Trailing whitespace
The system will attempt to automatically fix some issues:
- Replacing special characters with their text equivalents (e.g.,
⌘
toCMD
) - Converting lowercase special keys to uppercase (e.g.,
cmd
toCMD
) - Fixing indentation to be consistent (multiples of 2 spaces)
- Removing trailing whitespace
Here's a minimal example of a correctly formatted YAML cheatsheet:
title: "KoalaKeys"
RenderKeys: true # defaults to true
AllowText: false # defaults to false - requires RenderKeys: false
layout:
keyboard: US
system: Darwin
shortcuts:
General:
"CMD+C":
description: "Copy selected item"
"CMD+X":
description: "Cut selected item"
File and App Management:
"CMD+N":
description: "Open new window or document"
"CMD+O":
description: "Open selected item or display dialog to choose file to open"