These docs describe the main branch, including unreleased changes. Read the 0.6.0 docs.

@opentui/keymap/addons

Every export of @opentui/keymap/addons in the main-branch source, from its type declarations. A version names the release that added an export after the module's first release.

Functions#

function registerAliasesField<TTarget extends object, TEvent extends KeymapEvent>(keymap: Keymap<TTarget, TEvent>): () => void
Built-in addons
function registerBackspacePopsPendingSequence<TTarget extends object, TEvent extends KeymapEvent>(keymap: Keymap<TTarget, TEvent>, options?: BackspacePopsPendingSequenceOptions): () => void
Built-in addons
function registerBindingOverrides<TTarget extends object, TEvent extends KeymapEvent>(keymap: Keymap<TTarget, TEvent>): () => void
Built-in addons
function registerCommaBindings<TTarget extends object, TEvent extends KeymapEvent>(keymap: Keymap<TTarget, TEvent>): () => void
Built-in addons
function registerDeadBindingWarnings<TTarget extends object, TEvent extends KeymapEvent>(keymap: Keymap<TTarget, TEvent>): () => void
Built-in addons
function registerDefaultBindingParser<TTarget extends object, TEvent extends KeymapEvent>(keymap: Keymap<TTarget, TEvent>): () => void
Built-in addons
function registerDefaultEventMatchResolver<TTarget extends object, TEvent extends KeymapEvent>(keymap: Keymap<TTarget, TEvent>): () => void
Built-in addons
function registerDefaultKeys<TTarget extends object, TEvent extends KeymapEvent>(keymap: Keymap<TTarget, TEvent>): () => void
Built-in addons
function registerEmacsBindings<TTarget extends object, TEvent extends KeymapEvent>(keymap: Keymap<TTarget, TEvent>): () => void
Built-in addons
function registerEnabledFields<TTarget extends object, TEvent extends KeymapEvent>(keymap: Keymap<TTarget, TEvent>): () => void
Built-in addons
function registerEscapeClearsPendingSequence<TTarget extends object, TEvent extends KeymapEvent>(keymap: Keymap<TTarget, TEvent>, options?: EscapeClearsPendingSequenceOptions): () => void
Built-in addons
function registerExCommands<TTarget extends object, TEvent extends KeymapEvent>(keymap: Keymap<TTarget, TEvent>): () => void
Built-in addons
function registerLeader<TTarget extends object, TEvent extends KeymapEvent>(keymap: Keymap<TTarget, TEvent>, options: LeaderOptions): () => void
Built-in addons
function registerMetadataFields<TTarget extends object, TEvent extends KeymapEvent>(keymap: Keymap<TTarget, TEvent>): () => void
Built-in addons
function registerModBindings<TTarget extends object, TEvent extends KeymapEvent>(keymap: Keymap<TTarget, TEvent>): () => void
Built-in addons
function registerNeovimDisambiguation<TTarget extends object, TEvent extends KeymapEvent>(keymap: Keymap<TTarget, TEvent>, options?: NeovimDisambiguationOptions): () => void
Built-in addons
function registerTimedLeader<TTarget extends object, TEvent extends KeymapEvent>(keymap: Keymap<TTarget, TEvent>, options: TimedLeaderOptions): () => void
Built-in addons
function registerUnresolvedCommandWarnings<TTarget extends object, TEvent extends KeymapEvent>(keymap: Keymap<TTarget, TEvent>): () => void
Built-in addons

Interfaces#

interface BackspacePopsPendingSequenceOptions
Built-in addons
  • property BackspacePopsPendingSequenceOptions.preventDefault?: boolean
  • property BackspacePopsPendingSequenceOptions.priority?: number
interface EscapeClearsPendingSequenceOptions
Built-in addons
  • property EscapeClearsPendingSequenceOptions.preventDefault?: boolean
  • property EscapeClearsPendingSequenceOptions.priority?: number
interface ExCommandPayload
Built-in addons
  • property ExCommandPayload.args: readonly string[]
  • property ExCommandPayload.payload?: unknown
  • property ExCommandPayload.raw: string
interface LeaderOptions
Built-in addons
  • property LeaderOptions.name?: string
  • property LeaderOptions.trigger: LeaderTrigger
interface NeovimDisambiguationOptions
Built-in addons
  • property NeovimDisambiguationOptions.timeoutMs?: number
interface TimedLeaderOptions extends LeaderOptions
Built-in addons
  • property TimedLeaderOptions.onArm?: () => void
  • property TimedLeaderOptions.onDisarm?: () => void
  • property TimedLeaderOptions.timeoutMs?: number

Types#

type Aliases = Record<string, string>
Built-in addons
type Enabled = boolean | (() => boolean) | ReactiveMatcher
Built-in addons
type LeaderTrigger = KeyLike | Readonly<{ key: KeyLike; }> | readonly Readonly<{ key: KeyLike; }>[]
Built-in addons

Constants and variables#

const defaultBindingParser: BindingParser
Built-in addons
const defaultEventMatchResolver: EventMatchResolver<KeymapEvent>
Built-in addons

Namespaces and re-exports#

index ExCommand[key: string]: unknowninterface ExCommand<TTarget extends object = object, TEvent extends KeymapEvent = KeymapEvent>
Built-in addons
  • property ExCommand.aliases?: string[]
  • property ExCommand.name: string
  • property ExCommand.nargs?: "0" | "1" | "?" | "*" | "+"
  • property ExCommand.run: (ctx: CommandContext<TTarget, TEvent, ExCommandPayload>) => CommandResult<TTarget, TEvent>