/** The kind of action a binding runs. */ export declare enum KeyActionKind { SendShell = 0, Exec = 1, Mode = 2, Hold = 3 } /** The actions one key event runs. */ declare const OneKeyAction: { /** * Start a program, as `domicile exec` does: `argv[0]` found on the * desktop's `PATH`, without a shell. The SDK starts it; the shell hears * nothing. The desktop tells the person when it does not start. */ Exec: (argv: readonly string[]) => { argv: readonly string[]; kind: KeyActionKind.Exec; }; /** * Switch to another binding mode. The SDK handles this itself and tells the * shell the mode changed. */ Mode: (name: string) => { kind: KeyActionKind.Mode; name: string; }; /** * A command for the shell, as the arguments `domicile send-shell` would * pass. The shell defines what they mean. */ SendShell: (args: readonly string[]) => { args: readonly string[]; kind: KeyActionKind.SendShell; }; }; /** An action one key event runs. */ export type OneKeyAction = ReturnType<(typeof OneKeyAction)[keyof typeof OneKeyAction]>; export declare const KeyAction: { /** * Start a program, as `domicile exec` does: `argv[0]` found on the * desktop's `PATH`, without a shell. The SDK starts it; the shell hears * nothing. The desktop tells the person when it does not start. */ Exec: (argv: readonly string[]) => { argv: readonly string[]; kind: KeyActionKind.Exec; }; /** * Switch to another binding mode. The SDK handles this itself and tells the * shell the mode changed. */ Mode: (name: string) => { kind: KeyActionKind.Mode; name: string; }; /** * A command for the shell, as the arguments `domicile send-shell` would * pass. The shell defines what they mean. */ SendShell: (args: readonly string[]) => { args: readonly string[]; kind: KeyActionKind.SendShell; }; /** * Run `press` when the chord is pressed and `release` when it is let go. * The release runs whatever binding mode the keys are in by then, and runs * once per press however long the key repeats. */ Hold: (press: OneKeyAction, release: OneKeyAction) => { kind: KeyActionKind.Hold; press: OneKeyAction; release: OneKeyAction; }; }; export type KeyAction = ReturnType<(typeof KeyAction)[keyof typeof KeyAction]>; export {};