This repository has been archived on 2026-03-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
openclaw-extensions/wecom/node_modules/@mariozechner/pi-tui/dist/keybindings.d.ts
T

39 lines
1.7 KiB
TypeScript

import { type KeyId } from "./keys.js";
/**
* Editor actions that can be bound to keys.
*/
export type EditorAction = "cursorUp" | "cursorDown" | "cursorLeft" | "cursorRight" | "cursorWordLeft" | "cursorWordRight" | "cursorLineStart" | "cursorLineEnd" | "jumpForward" | "jumpBackward" | "pageUp" | "pageDown" | "deleteCharBackward" | "deleteCharForward" | "deleteWordBackward" | "deleteWordForward" | "deleteToLineStart" | "deleteToLineEnd" | "newLine" | "submit" | "tab" | "selectUp" | "selectDown" | "selectPageUp" | "selectPageDown" | "selectConfirm" | "selectCancel" | "copy" | "yank" | "yankPop" | "undo" | "expandTools" | "toggleSessionPath" | "toggleSessionSort" | "renameSession" | "deleteSession" | "deleteSessionNoninvasive";
export type { KeyId };
/**
* Editor keybindings configuration.
*/
export type EditorKeybindingsConfig = {
[K in EditorAction]?: KeyId | KeyId[];
};
/**
* Default editor keybindings.
*/
export declare const DEFAULT_EDITOR_KEYBINDINGS: Required<EditorKeybindingsConfig>;
/**
* Manages keybindings for the editor.
*/
export declare class EditorKeybindingsManager {
private actionToKeys;
constructor(config?: EditorKeybindingsConfig);
private buildMaps;
/**
* Check if input matches a specific action.
*/
matches(data: string, action: EditorAction): boolean;
/**
* Get keys bound to an action.
*/
getKeys(action: EditorAction): KeyId[];
/**
* Update configuration.
*/
setConfig(config: EditorKeybindingsConfig): void;
}
export declare function getEditorKeybindings(): EditorKeybindingsManager;
export declare function setEditorKeybindings(manager: EditorKeybindingsManager): void;
//# sourceMappingURL=keybindings.d.ts.map