import { AppService, HotkeyDescription, HotkeyProvider, HotkeysService } from 'tabby-core'; /** Id of the hotkey, shared between the provider, the defaults and the handler. */ export declare const INSERT_NEWLINE_HOTKEY = "sidebar-plus-insert-newline"; /** * Puts the cursor in the sidebar's filter field. * * Handled by the tree component itself rather than by the service below: the * field is its own, one per window, and reaching it from a root-provided * service would mean holding a reference to a component that is mounted and * unmounted at will. */ export declare const FOCUS_FILTER_HOTKEY = "sidebar-plus-focus-filter"; /** * Shows or hides the sidebar without unmounting it (#12) — see * SidebarPlusVisibilityService. Handled by the tree component for the same * reason as the filter hotkey, which also makes it a no-op while the plugin is * switched off: there is no component to receive it. */ export declare const TOGGLE_SIDEBAR_HOTKEY = "sidebar-plus-toggle-sidebar"; /** * Hotkey captions. Tabby's settings page runs `hotkey.name | translate` * itself, so these stay English keys and the tables translate them — the * lint script reads them through EXTRA_SOURCES, since `name:` is not one of * the literal shapes it extracts. */ export declare const INSERT_NEWLINE_HOTKEY_NAME = "Insert a line break (Better Sidebar)"; export declare const FOCUS_FILTER_HOTKEY_NAME = "Filter the profiles (Better Sidebar)"; export declare const TOGGLE_SIDEBAR_HOTKEY_NAME = "Show or hide the sidebar (Better Sidebar)"; /** * A hotkey that inserts a line break in the focused terminal. * * Why this exists at all: `Ctrl`+`Entrée` and `Entrée` are *indistinguishable* * once they reach the pty — xterm writes a bare CR (`^M`) for both, as * `Ctrl-V` in a shell shows. An application on the far end therefore cannot * tell them apart, whatever it does; only `Ctrl`+`J` (LF) gets through, which * is a poor substitute for a gesture used constantly. * * The distinction *does* still exist in the renderer, where the keyboard event * carries `ctrlKey`. Tabby's hotkey layer runs there, before the keystroke is * written to the pty — which is the one place a binding can act on it. The * action then writes the LF itself. */ export declare class SidebarPlusHotkeyService { private app; constructor(app: AppService, hotkeys: HotkeysService); private insertNewline; /** * The terminal actually in front, split panes included. * * `app.activeTab` returns the *split* for a divided tab, never the pane, so * the focused child has to be asked for explicitly — same two-step move as * `focusTab()` in `tabs.ts`. */ private focusedTerminal; } export declare class SidebarPlusHotkeyProvider extends HotkeyProvider { provide(): Promise; }