ink-cartridge
    Preparing search index...

    Function normalizeKeyNames

    • Convert Ink's (input, key) event into a list of possible key-name strings for matching.

      When a modifier (ctrl, shift, meta) is held, the bare key name is excluded so that modified keys (e.g. "shift+tab") do not accidentally trigger bindings registered for the bare key alone (e.g. "tab").

      Examples: press('s', { ctrl: true }) → ["ctrl+s"] press('', { escape: true }) → ["escape"] press('', { return: true, shift: true }) → ["shift+return"] press('', { tab: true }) → ["tab"] press('', { tab: true, shift: true }) → ["shift+tab"]

      Parameters

      • input: string

        Raw character string from Ink's useInput (empty for special keys).

      • key: unknown

        Full Key descriptor from Ink.

      Returns string[]

      An ordered array of key-name strings.