- Use
.yamlextension - Required top-level keys:
title,layout,shortcuts - Optional top-level keys:
RenderKeys,AllowText layoutspecifieskeyboard(US, UK, ...) andsystem(Darwin, Windows, Linux)shortcutsorganized by categories- Use all caps for key names (CMD, CTRL, SHIFT, ALT)
- Use
+to combine keys - Use
>to combine chords - 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
titleshould 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)DVORAK
Valid values for system are:
Darwin(for macOS)WindowsLinux
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
descriptionkey.
- 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. - Use
>to combine chords (separate keypress actions):Super+T>W>S(pressSuper+T, thenW, thenS)
- macOS (Darwin):
CMDfor Command key (⌘)CTRLfor Control key (⌃)ALTfor Option key (⌥)SHIFTfor Shift key
- Windows:
Windowsfor Windows keyCTRLfor Control keyALTfor Alt keySHIFTfor 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"
"CTRL+K>CTRL+C":
description: "Add Line Comment"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
keyboardandsystemin thelayoutsection - Proper structure of the
shortcutssection
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.,
cmdtoCMD) - 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"