# keymap/set
Bind a chord to a command name, replacing any prior binding. Publishes a change event on the `"keymap"` pub/sub topic. Returns the command as given.
## Syntax
[keymap/set "app" "mode" "chord" $command]
## Parameters
- `app` — app name (string or keyword)
- `mode` — mode name (string or keyword)
- `chord` — canonical chord string (string or keyword)
- `$command` — command name; any stringifiable value, stored in stringified form
## Examples
[keymap/set "editor" "vi" "ctrl-s" "cmd-save-all"] # → "cmd-save-all" [keymap/set "log" "default" "f" "cycle-filter"]
## Returns
The command value exactly as passed in (not its serialized form). `%Err{:message}` when a string/keyword argument is missing, the command is missing, or it is not stringifiable.
Subscribers on `"keymap"` receive `%{ :app :mode :chord :value :old }` under `:data`.
## See Also
`keymap/unset`, `keymap/reset`, `keymap/get`