Skip to main content

keybinding

function

Bind a keyboard shortcut to a command. Pass the `command` value itself when the command lives in the same mod, so the id is written once and a rename cannot break the binding. Pass a string only for a command someone else owns. A binding does not decide when the command is available. Give it the same Condition you gave the command's `when` so the chord goes quiet in the same situations the palette entry does.

function keybinding<TCommand extends string | Command<string>>(input: KeybindingInput<TCommand>): Keybinding<TCommand>

Import

import { keybinding } from '@modular/sdk';

Notes

category
State