tui-keybinding-debug
БесплатноБез исполняемых скриптовНе проверенDebug dead TUI/terminal keybindings — terminal interception, macOS Option typing Unicode, layout-impossible chords, legacy aliasing. Use when a configured key…
от laurigates★ 61 звезда на GitHubОб этом скилле
TUI Keybinding Debug
When to Use This Skill
| Use this skill when... | Use something else when... |
|---|---|
| A configured key does nothing in a TUI (ratatui/crossterm/promkit app), fzf, or a shell picker — no error, no reaction | The app throws a visible error on the key — that's an app bug, debug the app |
| A keybind works on one terminal and is dead on another | You're setting up a new keybind and want conventions — this is for diagnosing a dead one |
An fzf/gh picker's ctrl-/ (or other punctuation-Ctrl) toggle does nothing on a non-US keyboard |
The key is dead in the shell line editor itself — that's zsh/readline keymap territory, not terminal interception |
| You need to prove where a keystroke dies before touching code | General terminal/session recovery — see kitty-plugin:kitty-session-persistence |
The Core Insight
When a TUI key "does nothing," the instinct is to debug the app — its keymap, event matching, focus model. That instinct is wrong about half the time. A keystroke passes through four layers before the app can match it, and it can die silently at any of them:
- Terminal interception — the terminal (kitty, WezTerm, Ghostty, foot) consumes its own configured shortcut before the program sees the byte. No bytes reach the app, so no app-side config or code can catch it.
- Layout-impossible chord — on a non-US layout the character itself needs a modifier, so the Ctrl-combo is unproducible. The terminal never emits it; there is nothing to intercept.
- App-side legacy aliasing — the key does reach the app, but legacy terminal encoding aliases distinct keys to the same byte (
Ctrl+J==Enter), so the binding fires the wrong action. - macOS Option as a character key — the terminal treats Option as the native macOS text modifier, so
Option+<letter>types a Unicode character (Option+m→µ,Option+d→∂) and never sends Alt. The app receives a printable character, not an Alt chord. kitty does this by default (macos_option_as_alt no).
Diagnose the layer first. One debug run settles where the key dies in seconds, converting an open-ended app-side hunt into a targeted fix. Prefer a key the terminal forwards: bare Ctrl+<letter> is the only Ctrl-space that exists on every keyboard layout and passes through every terminal.
Execution
Diagnose this dead-keybinding failure by proving which of the four layers is eating the key. Work top-down — cheapest, most-common cause first.
Step 1: Prove where the key dies (terminal vs app)
Run these two kitty probes and press the dead key. (Adapt for other terminals — most have a key-debug mode; the reasoning is identical.)
kitty +kitten show_key -m kitty
Press the dead key. Nothing printed = the terminal ate it (layer 1 or 2). A clean CSI ... u / escape sequence printed = the key is reaching the app, so the bug is app-side (jump to Step 4). On macOS, an Alt/Option chord that prints a Unicode character (µ, ∂) instead of an alt-modified sequence is layer 4: the app got a character, not the chord (jump to Step 5).
kitty --debug-keyboard
Press the dead key and read the log. The smoking gun is a line like:
KeyPress matched action: <X>, handled as shortcut
handled as shortcut means the terminal claimed the key — confirm layer 1 and go to Step 2. If show_key printed nothing and the chord involves a shifted/AltGr character on your layout, suspect layer 2 (Step 3) before the terminal.
Step 2: Layer 1 — terminal interception
The terminal grabbed the key. Identify whether it's a user-config map (changeable) or a built-in default (usually not). Grep the kitty config for a map on the offending key:
grep -niE '^\s*map\s+' ~/.config/kitty/kitty.conf
Match the dead chord against this table of commonly-intercepted combos:
| Combo | Frequently grabbed by | Default or user config? |
|---|---|---|
Shift+Arrow |
kitty move_window (user config); macOS text-selection (moveDownAndModifySelection:) |
User config (kitty) — doubly spoken-for on macOS |
Ctrl+Shift+Arrow |
kitty scrollback scroll | Built-in default — won't appear in kitty.conf |
Ctrl+Arrow |
kitty neighboring_window / word-motion remaps |
Often user-mapped |
Cmd+*, Ctrl+Shift+* |
the terminal's entire shortcut namespace | Reserve for the terminal |
bare Ctrl+<letter> |
passes through to the app (except flow-control Ctrl+S/Ctrl+Q, suspend Ctrl+Z) |
The safe space for app keybinds |
Fix, in order of preference:
- Rebind the app to a key the terminal forwards — a bare
Ctrl+<letter>the app doesn't already use (e.g.switch_mode = ["Ctrl+T"]). This is the robust fix: it dodges interception everywhere. - Free the key in the terminal — only if it's a user map:
map shift+down no_opinkitty.conf. A built-in defa
Установить tui-keybinding-debug в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(kitty +kitten show_key *)Bash(kitty --debug-keyboard)Bash(grep *)ReadGrepFAQ
Что делает скилл tui-keybinding-debug?
Debug dead TUI/terminal keybindings — terminal interception, macOS Option typing Unicode, layout-impossible chords, legacy aliasing. Use when a configured key does nothing in a TUI, fzf, or shell app.
Как установить скилл tui-keybinding-debug?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл tui-keybinding-debug запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic