.claude/skills/verify-miri/features/shortcut-customization.md
Customize shortcuts
Settings > Shortcuts lists every action with its chords.
The person using Miri adds a chord by recording a key press, removes one, filters the list, and resets to the defaults.
Miri writes each change to [bindings] in config.toml, and the engine reloads it.
Sub-features
add: the + button on a row shows aType Shortcutchip and adds the next key press that holds Control, Option, or Command. Its accessibility label isAdd Shortcut for <action title>, and its help text isAdd a shortcut for <action title>. Escape cancels, and so does switching to another app.remove: the × button on a chip, labeledRemove <chord in words> from <action title>, such asRemove Control Option H from Focus column left, with help textRemove <chord>in menu symbols such asRemove ⌃⌥H, removes that chord. It shows while the pointer is on the row.conflict: a chord that another action holds shows the inline notice<chord> is already used by <action title>.and changes nothing. A chord that macOS holds asks in an alert, withUse AnywayandCancel.filter: theFilter shortcutsfield narrows the list.reset:Reset to Defaults…asksReplace all shortcuts with Miri's defaults?withReplaceandCancel.Replacefirst copies the file toconfig.toml.backups/<id>.tomlbesideconfig.toml.
How to get to it (user POV)
- Settings > Shortcuts.
- Edit
[bindings]in~/Library/Application Support/Miri Developer/config.tomlby hand.
Driving it with verify-miri
Preconditions:
- The baseline from the index, with Settings open through
V settings. <run>/backup/config.tomlholds the starting file.
Below, CFG is ~/Library/Application Support/Miri Developer/config.toml.
- Record the start. Save
ls "$CFG.backups"to a file in the run folder, and count theReloading configuration filelines inengine.log. - Show the page. Run
V ax test press Shortcuts, thenV ax test dump | rg "Remove|Add Shortcut". It lists oneRemove <chord in words> from <action>button per chord, and oneAdd Shortcut for <action>button per row with its help text. - Remove a chord. Run
V ax test press "Remove ⌃⌥H".diff <run>/backup/config.toml "$CFG"showsctrl+alt-hgone fromwindow_focus_west, andengine.loghas one moreReloading configuration fileline. - Prove the engine reloaded it. Open two new fixtures. With the right one focused,
V key ctrl+alt-hleaves focus where it is.V key ctrl+alt-leftarrowandV focused --wait-forthe left fixture exit 0. - Add a chord. Run
V settings, so Miri is the frontmost app, and press the row's + button by its help text, such asV ax test press "Add a shortcut for Focus column left". The dump showsType Shortcut. RunV key ctrl+alt-h. The diff shows the chord added at the end of the row's list. - Conflict with an action. Press
"Add a shortcut for Focus column left"again, thenV key ctrl+alt-l. The dump shows⌃⌥L is already used by Focus column right., and the file does not change. - Conflict with macOS. Press the + button again, then
V key ctrl+cmd-space. The dump shows an alert,⌃⌘Space is used by macOS for Emoji and Symbols., withCancelandUse Anyway. PressCancel. The file does not change. - Reset. Press
Reset to Defaults…, thenReplacein a second call. The diff shows the default[bindings], and$CFG.backups/holds one new file, a copy of the file before the reset. - Put it back. Copy
<run>/backup/config.tomlover$CFG, check thatdiffis empty, and delete only the backup files this run added. The engine logs one more reload. Prove a restored chord withV keyfrom a fixture.
Gotchas
config.tomlis Sam's real configuration. Always diff it against the backup beforeV end.- The recorder cancels when another app comes to the front. Run
V settingsright before you press a + button. - Pressing a button in an alert can return
AXError -25205, because the alert closes during the press. Read the dump to see whether the alert closed. - Miri Settings is a floating window, so ⌃⌥← and ⌃⌥→ do nothing while it has focus. Prove a chord from a fixture. Focus a window with a shortcut explains this.
- Use ⌃⌘Space for the macOS conflict. If a press reaches macOS, it only opens the emoji picker, while a chord such as ⌃↑ opens Mission Control.
- The
Filter shortcutsfield needs text entry, whichaxdocannot do. The filter is not drivable yet.