I got frustrated hunting and removing shortcuts from GNOME / Cinnamon when working with an IDE.
The shortcuts CLI can export and import keyboard shortcut settings as JSON (via gsettings), clean WM keybindings so only Super-based shortcuts and basic window keys (Alt+Tab, Alt+F4, Alt+Space) remain, or clean-cinnamon-super to turn off the Cinnamon Grouped Window List applet’s Super+number hotkeys (via dconf and spice JSON under ~/.config/cinnamon).
Requires Python 3.7+. Run from the project directory (or install the shortcuts package on PYTHONPATH).
python3 -m shortcuts clean # prune WM shortcuts (default schemas)
python3 -m shortcuts clean --schemas org.gnome.desktop.wm.keybindings
python3 -m shortcuts export -o backup.json
python3 -m shortcuts export --extra-schema org.gnome.Some.Schema
python3 -m shortcuts import backup.json
python3 -m shortcuts import backup.json --dry-run
python3 -m shortcuts import backup.json --backup # export current settings first
python3 -m shortcuts import backup.json --backup /path/to/snapshot.json
python3 -m shortcuts import backup.json --strict # fail on first error
python3 -m shortcuts clean-cinnamon-super # disable GWL Super+number from applet "grouped window list"
python3 -m shortcuts clean-cinnamon-super --dry-run # show what would changeExports are a single object with format_version, optional meta, and an entries array. Each entry is { "schema", "key", "value" } where value is the exact string returned by gsettings get (lossless round-trip).
Example:
{
"format_version": 1,
"meta": {
"generator": "shortcuts",
"hostname": "mybox",
"timestamp": "2026-04-10T12:00:00+00:00"
},
"entries": [
{
"schema": "org.gnome.desktop.wm.keybindings",
"key": "switch-to-workspace-1",
"value": "@as ['<Super>Home']"
}
]
}Cinnamon custom shortcuts (the slots listed in custom-list) store binding, command, and name under relocatable schemas, for example org.cinnamon.desktop.keybindings.custom-keybinding:/org/cinnamon/desktop/keybindings/custom-keybindings/custom1/. Export includes those entries so commands such as shell scripts appear in the JSON. GNOME uses the same idea under org.gnome.settings-daemon.plugins.media-keys (custom-keybindings plus …custom-keybinding:… paths).
Unknown or missing schemas are skipped with a warning so the same file can be used across machines.